|
|
@ -3095,15 +3095,9 @@ void CBasePlayer::SelectItem( const char *pstr ) |
|
|
|
|
|
|
|
|
|
|
|
if( m_pActiveItem ) |
|
|
|
if( m_pActiveItem ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(m_pActiveItem->GetWeaponPtr()); |
|
|
|
m_pActiveItem->pev->oldbuttons = 1; |
|
|
|
if (weapon) |
|
|
|
|
|
|
|
weapon->m_ForceSendAnimations = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_pActiveItem->Deploy(); |
|
|
|
m_pActiveItem->Deploy(); |
|
|
|
|
|
|
|
m_pActiveItem->pev->oldbuttons = 0; |
|
|
|
if (weapon) |
|
|
|
|
|
|
|
weapon->m_ForceSendAnimations = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_pActiveItem->UpdateItemInfo(); |
|
|
|
m_pActiveItem->UpdateItemInfo(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3130,14 +3124,9 @@ void CBasePlayer::SelectLastItem( void ) |
|
|
|
m_pActiveItem = m_pLastItem; |
|
|
|
m_pActiveItem = m_pLastItem; |
|
|
|
m_pLastItem = pTemp; |
|
|
|
m_pLastItem = pTemp; |
|
|
|
|
|
|
|
|
|
|
|
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(m_pActiveItem->GetWeaponPtr()); |
|
|
|
m_pActiveItem->pev->oldbuttons = 1; |
|
|
|
if (weapon) |
|
|
|
|
|
|
|
weapon->m_ForceSendAnimations = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_pActiveItem->Deploy(); |
|
|
|
m_pActiveItem->Deploy(); |
|
|
|
|
|
|
|
m_pActiveItem->pev->oldbuttons = 0; |
|
|
|
if (weapon) |
|
|
|
|
|
|
|
weapon->m_ForceSendAnimations = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_pActiveItem->UpdateItemInfo(); |
|
|
|
m_pActiveItem->UpdateItemInfo(); |
|
|
|
} |
|
|
|
} |
|
|
@ -4610,14 +4599,9 @@ BOOL CBasePlayer::SwitchWeapon( CBasePlayerItem *pWeapon ) |
|
|
|
|
|
|
|
|
|
|
|
m_pActiveItem = pWeapon; |
|
|
|
m_pActiveItem = pWeapon; |
|
|
|
|
|
|
|
|
|
|
|
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(pWeapon->GetWeaponPtr()); |
|
|
|
pWeapon->pev->oldbuttons = 1; |
|
|
|
if (weapon) |
|
|
|
|
|
|
|
weapon->m_ForceSendAnimations = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pWeapon->Deploy(); |
|
|
|
pWeapon->Deploy(); |
|
|
|
|
|
|
|
pWeapon->pev->oldbuttons = 0; |
|
|
|
if (weapon) |
|
|
|
|
|
|
|
weapon->m_ForceSendAnimations = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return TRUE; |
|
|
|
return TRUE; |
|
|
|
} |
|
|
|
} |
|
|
|