Facepunch / sbox-issues

175 stars 12 forks source link

[Citizen Model] Changing "holdtype" snaps arms to previous rotation #652

Closed Willco2 closed 11 months ago

Willco2 commented 3 years ago

Describe the bug When changing "holdtype" from none to holditem (or the other way around), the arms are snapped to the rotation they were at before the holdtype was changed.

To Reproduce

  1. Change citizen holdtype from 0 to 4
  2. Rotate the player 180 degrees
  3. Set holdtype back to 0

Expected behavior The arms should raise and lower to the correct relative position regardless of rotation that occurred.

Video Demonstration

https://user-images.githubusercontent.com/33941498/128913246-6a1a7999-5415-42e3-87d3-a5cdc770cd4d.mp4

Additional context The following code was used in the pawns Simulate method to produce the bug.

SetAnimInt("holdtype_handedness", 0);
if (Input.Down(InputButton.Attack1)) SetAnimInt("holdtype", 4);
else SetAnimInt("holdtype", 0);
MaxLebled commented 3 years ago

This should be fixed, can you confirm?

Willco2 commented 3 years ago

The issue still appears to be present. Video: https://giant.gfycat.com/ElementaryUncomfortableKid.mp4