Skip to content

Commit

Permalink
Fix deploy animations sometimes not playing on weapon pickup (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Aug 5, 2022
1 parent abf08e4 commit 4053dca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4609,8 +4609,16 @@ BOOL CBasePlayer::SwitchWeapon( CBasePlayerItem *pWeapon )
}

m_pActiveItem = pWeapon;

CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(pWeapon->GetWeaponPtr());
if (weapon)
weapon->m_ForceSendAnimations = true;

pWeapon->Deploy();

if (weapon)
weapon->m_ForceSendAnimations = false;

return TRUE;
}

Expand Down

0 comments on commit 4053dca

Please sign in to comment.