SERVER: Fixed an issue where sprint anim wouldn't play while sprinting after swapping your weapon

This commit is contained in:
MikeyRay 2023-03-25 03:14:52 +01:00
parent eeab4dd4c2
commit 3ea073a171

View file

@ -29,6 +29,7 @@
void() W_PutOut; void() W_PutOut;
void(float side) W_Reload; void(float side) W_Reload;
void() GrenadeExplode; void() GrenadeExplode;
void() W_SprintStart;
void() ReturnWeaponModel = void() ReturnWeaponModel =
{ {
@ -47,6 +48,11 @@ void() ReturnWeaponModel =
// Always try to reload after any action. // Always try to reload after any action.
if (self.currentmag == 0 && self.currentammo != 0) if (self.currentmag == 0 && self.currentammo != 0)
W_Reload(S_BOTH); W_Reload(S_BOTH);
// If the person is swapping, play the sprint anim if they're sprinting after swap. Otherwise it plays idle
if (self.sprinting == TRUE)
W_SprintStart();
} }
void() W_PlayTakeOut = void() W_PlayTakeOut =