mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-11 20:11:33 +03:00
Fixed custom gun not reseting zoom when holstered
This commit is contained in:
@@ -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:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user