Skip to content

setPedAnimation() does not work when a ped is attached and floating in air #463

Closed

Description

@Einheit-101

Describe the bug
Currently setPedAnimation() while being attached only works when the ped has something below his feet (i.e. he is glued on top of a car using "glue" resource).
Trying to play animations while a player is floating in the air does not work, but setPedAnimation() will still return true.

To Reproduce
Steps to reproduce the behavior:

  1. Spawn a car

  2. Walk on the car roof

  3. crun attachElements(me, getPedContactElement(me), 0, 0, 3)

  4. crun setPedAnimation(me, "dancing", "dnce_m_d", 1000, true, false, true, true)
    -> The animation will not play, no matter what you do.

  5. crun attachElements(me, getPedContactElement(me), 0, 0, 1)

  6. crun setPedAnimation(me, "dancing", "dnce_m_d", 1000, true, false, true, true)
    -> The animation will now play, because you are in contact with the car

Expected behavior
setPedAnimation() should force the animation even when the player has no contact with another object, at least if interruptable is set to false.

MTA version 1.5.6-release-14378

Activity

  1. added this to the Backlog milestone on Mar 3, 2019
  2. Einheit-101 commented on Oct 14, 2019

    @Einheit-101
    Author

    I can no longer reproduce this with the steps to reproduce. The animation always plays even without contact element. I think this can be closed if no one else can confirm this anymore.

  3. qaisjp commented on Oct 14, 2019

    @qaisjp
    Member

    I vaguely recall a "recent" fix relating to attachElements (6-12 months?)

    can someone track the commit down?

  4. Einheit-101 commented on Oct 14, 2019

    @Einheit-101
    Author
  5. qaisjp commented on Oct 15, 2019

    @qaisjp
    Member

    yes 14e5d11 is what i was thinking of. this commit is small enough for you to revert, build & test (that the bug returns). are you (or someone) able to do that?

  6. Einheit-101 commented on Oct 15, 2019

    @Einheit-101
    Author

    I cant, i still dont know how to build MTA and even then, i would not know what to do with the code 😂👌🏼

  7. qaisjp commented on Oct 15, 2019

    @qaisjp
    Member

    If you're interested in building for the first time, pop over to Discord and I'm sure someone will help you get started :)

    I can then tell you how to change the code to test it! You will need to have https://desktop.github.com/ installed and I think follow https://wiki.multitheftauto.com/wiki/Compiling_MTASA

  8. Einheit-101 commented on Oct 16, 2019

    @Einheit-101
    Author

    I think i will try it at some point :D
    Maybe i can fix some famous bugs at some point...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions