aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/shared/hl2mp/weapon_hl2mpbase_machinegun.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/game/shared/hl2mp/weapon_hl2mpbase_machinegun.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/game/shared/hl2mp/weapon_hl2mpbase_machinegun.h')
-rw-r--r--sp/src/game/shared/hl2mp/weapon_hl2mpbase_machinegun.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/sp/src/game/shared/hl2mp/weapon_hl2mpbase_machinegun.h b/sp/src/game/shared/hl2mp/weapon_hl2mpbase_machinegun.h
new file mode 100644
index 00000000..0be51bbe
--- /dev/null
+++ b/sp/src/game/shared/hl2mp/weapon_hl2mpbase_machinegun.h
@@ -0,0 +1,58 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#include "weapon_hl2mpbase.h"
+
+#ifndef BASEHLCOMBATWEAPON_H
+#define BASEHLCOMBATWEAPON_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#if defined( CLIENT_DLL )
+ #define CHL2MPMachineGun C_HL2MPMachineGun
+#endif
+
+//=========================================================
+// Machine gun base class
+//=========================================================
+class CHL2MPMachineGun : public CWeaponHL2MPBase
+{
+public:
+ DECLARE_CLASS( CHL2MPMachineGun, CWeaponHL2MPBase );
+ DECLARE_DATADESC();
+
+ CHL2MPMachineGun();
+
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+
+ void PrimaryAttack( void );
+
+ // Default calls through to m_hOwner, but plasma weapons can override and shoot projectiles here.
+ virtual void ItemPostFrame( void );
+ virtual void FireBullets( const FireBulletsInfo_t &info );
+ virtual bool Deploy( void );
+
+ virtual const Vector &GetBulletSpread( void );
+
+ int WeaponSoundRealtime( WeaponSound_t shoot_type );
+
+ // utility function
+ static void DoMachineGunKick( CBasePlayer *pPlayer, float dampEasy, float maxVerticleKickAngle, float fireDurationTime, float slideLimitTime );
+
+private:
+
+ CHL2MPMachineGun( const CHL2MPMachineGun & );
+
+protected:
+
+ int m_nShotsFired; // Number of consecutive shots fired
+
+ float m_flNextSoundTime; // real-time clock of when to make next sound
+};
+
+#endif // BASEHLCOMBATWEAPON_H