summaryrefslogtreecommitdiff
path: root/game/shared/cstrike/weapon_csbasegun.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/cstrike/weapon_csbasegun.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/cstrike/weapon_csbasegun.h')
-rw-r--r--game/shared/cstrike/weapon_csbasegun.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/game/shared/cstrike/weapon_csbasegun.h b/game/shared/cstrike/weapon_csbasegun.h
new file mode 100644
index 0000000..6781340
--- /dev/null
+++ b/game/shared/cstrike/weapon_csbasegun.h
@@ -0,0 +1,58 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef WEAPON_CSBASE_GUN_H
+#define WEAPON_CSBASE_GUN_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "weapon_csbase.h"
+
+
+// This is the base class for pistols and rifles.
+#if defined( CLIENT_DLL )
+
+ #define CWeaponCSBaseGun C_WeaponCSBaseGun
+
+#else
+#endif
+
+
+class CWeaponCSBaseGun : public CWeaponCSBase
+{
+public:
+
+ DECLARE_CLASS( CWeaponCSBaseGun, CWeaponCSBase );
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+
+ CWeaponCSBaseGun();
+
+ virtual void PrimaryAttack();
+ virtual void Spawn();
+ virtual bool Deploy();
+ virtual bool Reload();
+ virtual void WeaponIdle();
+
+ // Derived classes call this to fire a bullet.
+ bool CSBaseGunFire( float flCycleTime, CSWeaponMode weaponMode );
+
+ // Usually plays the shot sound. Guns with silencers can play different sounds.
+ virtual void DoFireEffects();
+ virtual void ItemPostFrame();
+
+protected:
+ float m_zoomFullyActiveTime;
+
+private:
+
+ CWeaponCSBaseGun( const CWeaponCSBaseGun & );
+};
+
+
+#endif // WEAPON_CSBASE_GUN_H