2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 01:47:45 +01:00

Fix deploy animations sometimes not playing on weapon pickup (#299)

This commit is contained in:
Roman Chistokhodov 2022-08-05 16:22:03 +03:00 committed by GitHub
parent abf08e4520
commit 4053dca7a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}