Skip to content

Commit 79adfd3

Browse files
committed
add ClearPlayerTasks and fix ClearAnimations
1 parent dcd0190 commit 79adfd3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Server/Components/Pawn/Scripting/Player/Natives.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,12 @@ SCRIPT_API(GetPlayerWorldBounds, bool(IPlayer& player, Vector4& bounds))
415415

416416
SCRIPT_API(ClearAnimations, bool(IPlayer& player, int syncType))
417417
{
418-
// TODO: This must be fixed on client side
419-
// At the moment ClearAnimations flushes all tasks applied to player
420-
// Including driving, siting in vehicle, shooting, jumping, or any sort of a task
421-
// And it doesn't just clear applied animations, in order to keep it compatible with
422-
// Current samp scripts without requiring a change, we call IPlayer::clearTasks temporarily.
418+
player.clearAnimations(PlayerAnimationSyncType(syncType));
419+
return true;
420+
}
421+
422+
SCRIPT_API(ClearPlayerTasks, bool(IPlayer& player, int syncType))
423+
{
423424
player.clearTasks(PlayerAnimationSyncType(syncType));
424425
return true;
425426
}

0 commit comments

Comments
 (0)