Skip to content
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

Changing skin resets ped animation speed #882

Open
qaisjp opened this issue Apr 23, 2019 · 2 comments
Open

Changing skin resets ped animation speed #882

qaisjp opened this issue Apr 23, 2019 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@qaisjp
Copy link
Contributor

qaisjp commented Apr 23, 2019

Describe the bug

Changing skin resets ped animation speed

To reproduce

  1. ss 0
  2. anim fat fatsprint
  3. me:setAnimationSpeed("fatsprint", 2)
  4. ss 1
  5. observe speed of animation go back to normal

Expected behaviour

Animation speed should not be reset

Version

49ffc91 windows

Additional context

fix can be added here

// Are we still playing a looped animation?
but if added in exactly that block, the bug will only be fixed for anims set by setPedAnimation, not other animations updated with setPedAnimationSpeed

@qaisjp qaisjp added the bug Something isn't working label Apr 23, 2019
@qaisjp qaisjp added this to the Backlog milestone Apr 23, 2019
@Einheit-101
Copy link

Animation speed also resets when the animation gets re-applied, for example if i modify speed of idle_stance Animation and go crouching and stand up again, the speed is reset.
However its not a Problem, i simply use setPedAnimationSpeed in onClientPreRender.

@qaisjp
Copy link
Contributor Author

qaisjp commented Apr 23, 2019

I've taken a quick look at fixing this issue (setElementModel resetting the speed).

Simply getting the speed and applying it after the animation is re-applied (post-model change) doesn't really work because the animation is applied downstream using a SimpleRunNamedAnim task (via RunNamedAnimation).

That task doesn't have an fAnimSpeed flag.

if i modify speed of idle_stance Animation and go crouching and stand up again, the speed is reset

For a separate issue: perhaps we could have a persist=false argument that saves the expected animation speed somewhere, that should do what you're looking for. We would need to evaluate if looking up the animation speed in a map will be a bottleneck for the animation system.

Animation speed also resets when the animation gets re-applied

I can't reproduce this with setPedAnimation, only with "natural animations" (like the one you mentioned above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants