-
-
Notifications
You must be signed in to change notification settings - Fork 91
fix(client): replace TaskTurnPedToFaceCoord with SetEntityHeading to prevent canceled animations #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ew animations Signed-off-by: 0Programmer <[email protected]>
|
What use case does this satisfy ? |
|
TaskTurnPedToFaceCoord cancels any animation started while the player is being searched. So if you want to play new animations during the search, they won’t work properly. Possible ways around this:
I guess only a small group actually wants animations while searching/robbing, so maybe we just close the PR and let them tweak it themselves. Still, could be nice to mention in Common Issues, since it took me a while to figure out why animations kept getting canceled. |
…prevent canceled animations Replaced TaskTurnPedToFaceCoord with a manual heading calculation using GetHeadingFromVector_2d and SetEntityHeading. - Prevents ongoing or new animations from being canceled when searching/robbing a player. - Still ensures the ped faces the target at the start. This avoids the side effect of TaskTurnPedToFaceCoord canceling animations while keeping the aesthetic alignment. Signed-off-by: 0Programmer <[email protected]>
|
I'd say set heading is more appropriate solution to the issue described that wouldn't effect current servers. |
|
I thought the same, I’ve already pushed that change. |
|
IMO, changing it from something that actively moves your ped in the right direction to instant setting your direction is the wrong approach. |
|
I guess, but for now this solves the issue described (TaskTurnPedToFaceCoord cancels animations), might be the only one that wants animations while inside others inventory. I do not have that much time to find a better solution, feel free to edit, close this pr and reapply a better solution. |
This fix ensures that TaskTurnPedToFaceCoord is only run once, preserving ongoing or new animations.
Is it necessary to run this every few ticks? If so, I can adjust it.