summaryrefslogtreecommitdiff
path: root/game/shared/tf2/tf_obj_driver_machinegun_shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/shared/tf2/tf_obj_driver_machinegun_shared.h')
-rw-r--r--game/shared/tf2/tf_obj_driver_machinegun_shared.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/game/shared/tf2/tf_obj_driver_machinegun_shared.h b/game/shared/tf2/tf_obj_driver_machinegun_shared.h
new file mode 100644
index 0000000..436d421
--- /dev/null
+++ b/game/shared/tf2/tf_obj_driver_machinegun_shared.h
@@ -0,0 +1,62 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Vehicle mounted machinegun that the driver controls
+//
+//=============================================================================//
+
+#ifndef TF_OBJ_DRIVER_MACHINEGUN_H
+#define TF_OBJ_DRIVER_MACHINEGUN_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tf_obj_basedrivergun_shared.h"
+
+#if defined( CLIENT_DLL )
+#define CObjectDriverMachinegun C_ObjectDriverMachinegun
+#endif
+
+// ------------------------------------------------------------------------ //
+// Mounted machinegun
+// ------------------------------------------------------------------------ //
+class CObjectDriverMachinegun : public CBaseObjectDriverGun
+{
+DECLARE_CLASS( CObjectDriverMachinegun, CBaseObjectDriverGun );
+
+public:
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+
+ CObjectDriverMachinegun();
+
+ virtual void Spawn();
+ virtual void Precache();
+
+ // Firing
+ virtual bool CanFireNow( void );
+ virtual void Fire( CBaseTFPlayer *pDriver );
+
+ // Turning
+ virtual Vector GetFireOrigin( void );
+ virtual void SetTargetAngles( const QAngle &vecAngles );
+
+#if defined( CLIENT_DLL )
+ void GetBoneControllers( float controllers[MAXSTUDIOBONECTRLS] );
+ virtual void DrawHudElements( void );
+#endif
+
+ // Ammo
+ void RechargeThink( void );
+
+private:
+ float m_flNextAttack;
+ int m_nBarrelAttachment;
+ int m_nAmmoType;
+ CNetworkVar( int, m_nAmmoCount );
+ int m_nMaxAmmoCount;
+
+private:
+ CObjectDriverMachinegun( const CObjectDriverMachinegun & ); // not defined, not accessible
+};
+
+#endif // TF_OBJ_DRIVER_MACHINEGUN_H