Skip to content

Aiming followed by setPedAnimation breaks aim target #883

Open
@qaisjp

Description

@qaisjp

Describe the bug

To reproduce

  1. bind 2 anim fat fatsprint
  2. give uzi
  3. stand still
  4. hold right mouse button to aim, move mouse around and observe that camera movement moves the arm around
  5. whilst still aiming, press 2 to apply the animation
  6. aiming no longer works (if you continue holding RMB)
  7. aim target is locked (if you continue holding RMB, or even if you let go of RMB)

Expected behaviour

One of the following:

  1. aiming should continue to work
  2. aiming should be reset completely

Screenshots

video

tasks before (nothing, just standing with a gun):

image

tasks before (just aiming):

image

tasks after (aiming + anim):

image

tasks after (not aiming + anim):

image

Version

49ffc91 windows

Additional context

It seems that TASK_SIMPLE_USE_GUN (type TASK_SECONDARY_ATTACK) ordinarily does the following:

  1. set type TASK_SECONDARY_IK to TASK_SIMPLE_IK_MANAGER when you aim
  2. resets TASK_SECONDARY_IK and hide the aiming reticle when you try to aim behind you
  3. resets TASK_SECONDARY_IK, hide the aiming reticle, and remove TASK_SECONDARY_ATTACK when you stop aiming (release RMB)

All of the above doesn't happen if TASK_PRIMARY is set (to TASK_SIMPLE_NAMED_ANIM). I'm not sure if this is intended behaviour.

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