summaryrefslogtreecommitdiff
path: root/game/shared/dod/weapon_dodfireselect.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/dod/weapon_dodfireselect.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/dod/weapon_dodfireselect.h')
-rw-r--r--game/shared/dod/weapon_dodfireselect.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/game/shared/dod/weapon_dodfireselect.h b/game/shared/dod/weapon_dodfireselect.h
new file mode 100644
index 0000000..2e00edb
--- /dev/null
+++ b/game/shared/dod/weapon_dodfireselect.h
@@ -0,0 +1,73 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef WEAPON_DODFIRESELECT_H
+#define WEAPON_DODFIRESELECT_H
+
+#include "cbase.h"
+#include "weapon_dodbasegun.h"
+
+#if defined( CLIENT_DLL )
+#define CDODFireSelectWeapon C_DODFireSelectWeapon
+
+#include "c_dod_player.h"
+#endif
+
+class CDODFireSelectWeapon : public CWeaponDODBaseGun
+{
+public:
+ DECLARE_CLASS( CDODFireSelectWeapon, CWeaponDODBaseGun );
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+
+ CDODFireSelectWeapon();
+
+ virtual void Spawn();
+ virtual void PrimaryAttack( void );
+ virtual void SecondaryAttack( void );
+ virtual float GetWeaponAccuracy( float flPlayerSpeed );
+ virtual float GetFireDelay( void );
+ virtual void Drop( const Vector &vecVelocity );
+
+ bool IsSemiAuto( void );
+
+ virtual Activity GetIdleActivity( void );
+ virtual Activity GetPrimaryAttackActivity( void );
+ virtual Activity GetReloadActivity( void );
+ virtual Activity GetDrawActivity( void );
+
+#ifdef CLIENT_DLL
+ virtual Vector GetDesiredViewModelOffset( C_DODPlayer *pOwner );
+
+ void ResetViewModelAnimDir( void )
+ {
+ m_bAnimToSemiAuto = true;
+ m_flPosChangeTimer = 0;
+ }
+
+ virtual void OnWeaponDropped( void )
+ {
+ ResetViewModelAnimDir();
+
+ m_bSemiAuto = false;
+
+ BaseClass::OnWeaponDropped();
+ }
+#endif
+
+private:
+ CNetworkVar( bool, m_bSemiAuto );
+
+#ifdef CLIENT_DLL
+ bool m_bAnimToSemiAuto;
+ float m_flPosChangeTimer;
+#endif
+
+private:
+ CDODFireSelectWeapon( const CDODFireSelectWeapon & );
+};
+
+#endif //WEAPON_DODFIRESELECT_H \ No newline at end of file