mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-03 02:24:28 +00:00
Fix deploy animations sometimes not playing on weapon pickup (#299)
This commit is contained in:
parent
abf08e4520
commit
4053dca7a9
@ -4609,8 +4609,16 @@ BOOL CBasePlayer::SwitchWeapon( CBasePlayerItem *pWeapon )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_pActiveItem = pWeapon;
|
m_pActiveItem = pWeapon;
|
||||||
|
|
||||||
|
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(pWeapon->GetWeaponPtr());
|
||||||
|
if (weapon)
|
||||||
|
weapon->m_ForceSendAnimations = true;
|
||||||
|
|
||||||
pWeapon->Deploy();
|
pWeapon->Deploy();
|
||||||
|
|
||||||
|
if (weapon)
|
||||||
|
weapon->m_ForceSendAnimations = false;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user