Skip to content

Commit c15b656

Browse files
committed
add ClearPlayerTasks and fix ClearAnimations
1 parent 4d3fbcf commit c15b656

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
@@ -412,11 +412,12 @@ SCRIPT_API(GetPlayerWorldBounds, bool(IPlayer& player, Vector4& bounds))
412412

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

0 commit comments

Comments
 (0)