fix(client): replace TaskTurnPedToFaceCoord with SetEntityHeading to prevent canceled animations#54
fix(client): replace TaskTurnPedToFaceCoord with SetEntityHeading to prevent canceled animations#540Programmer wants to merge 6 commits intoCommunityOx:mainfrom
Conversation
…ew animations Signed-off-by: 0Programmer <60280452+0Programmer@users.noreply.github.com>
|
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 <60280452+0Programmer@users.noreply.github.com>
|
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.