Skip to content

Commit 2f3c824

Browse files
committed
code wise
1 parent fbd23c9 commit 2f3c824

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,14 +2490,14 @@ bool CLuaPedDefs::killPedTask(CClientPed* ped, taskType taskType, std::uint8_t t
24902490
if (taskNumber == TASK_PRIORITY_DEFAULT)
24912491
throw LuaFunctionError("Killing TASK_PRIORITY_DEFAULT is not allowed");
24922492

2493-
if (taskNumber > TASK_PRIORITY_DEFAULT)
2493+
if (taskNumber >= TASK_PRIORITY_MAX)
24942494
throw LuaFunctionError("Invalid task slot number");
24952495

24962496
return ped->KillTask(taskNumber, gracefully.value_or(true));
24972497
}
24982498
case taskType::SECONDARY_TASK:
24992499
{
2500-
if (taskNumber > TASK_SECONDARY_IK)
2500+
if (taskNumber >= TASK_SECONDARY_MAX)
25012501
throw LuaFunctionError("Invalid task slot number");
25022502

25032503
return ped->KillTaskSecondary(taskNumber, gracefully.value_or(true));

0 commit comments

Comments
 (0)