Added new player animation types and applied more player animations to SP HL2 weapons

This commit is contained in:
Blixibon
2021-11-15 14:43:58 -06:00
parent 6755a4d3f6
commit 41d799bbdf
13 changed files with 118 additions and 6 deletions

View File

@@ -1581,6 +1581,10 @@ bool CBaseCombatWeapon::DefaultDeploy( char *szViewModel, char *szWeaponModel, i
SetViewModel();
SendWeaponAnim( iActivity );
#ifdef MAPBASE
pOwner->SetAnimation( PLAYER_UNHOLSTER );
#endif
pOwner->SetNextAttack( gpGlobals->curtime + SequenceDuration() );
}
@@ -1652,6 +1656,11 @@ bool CBaseCombatWeapon::Holster( CBaseCombatWeapon *pSwitchingTo )
if (pOwner)
{
pOwner->SetNextAttack( gpGlobals->curtime + flSequenceDuration );
#ifdef MAPBASE
if (pOwner->IsPlayer())
static_cast<CBasePlayer*>(pOwner)->SetAnimation( PLAYER_HOLSTER );
#endif
}
// If we don't have a holster anim, hide immediately to avoid timing issues