mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-25 14:25:32 +03:00
Fixed custom gun not reseting zoom when holstered
This commit is contained in:
parent
37019140bd
commit
d3978db574
@ -386,6 +386,7 @@ public:
|
||||
virtual void ItemPostFrame(void); // called each frame by the player PostThink
|
||||
virtual void ItemBusyFrame(void); // called each frame by the player PostThink, if the player's not ready to attack yet
|
||||
virtual bool ReloadOrSwitchWeapons(void);
|
||||
virtual bool Holster(CBaseCombatWeapon* pSwitchingTo = NULL);
|
||||
|
||||
// Bullet launch information
|
||||
virtual const Vector& GetBulletSpread(void);
|
||||
@ -782,6 +783,17 @@ void CHLCustomWeaponGun::AddViewKick(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool CHLCustomWeaponGun::Holster(CBaseCombatWeapon* pSwitchingTo)
|
||||
{
|
||||
// Stop zooming
|
||||
if (m_bInZoom)
|
||||
{
|
||||
ToggleZoom();
|
||||
}
|
||||
|
||||
return BaseClass::Holster(pSwitchingTo);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user