summaryrefslogtreecommitdiff
path: root/game/shared/tf/tf_weapon_revolver.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/tf/tf_weapon_revolver.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/tf/tf_weapon_revolver.h')
-rw-r--r--game/shared/tf/tf_weapon_revolver.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/game/shared/tf/tf_weapon_revolver.h b/game/shared/tf/tf_weapon_revolver.h
new file mode 100644
index 0000000..d83c3f1
--- /dev/null
+++ b/game/shared/tf/tf_weapon_revolver.h
@@ -0,0 +1,86 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+//
+//=============================================================================
+#ifndef TF_WEAPON_REVOLVER_H
+#define TF_WEAPON_REVOLVER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tf_weaponbase_gun.h"
+
+// Client specific.
+#ifdef CLIENT_DLL
+#define CTFRevolver C_TFRevolver
+#define CTFRevolver_Secondary C_TFRevolver_Secondary
+#endif
+
+//=============================================================================
+//
+// TF Weapon Revolver.
+//
+class CTFRevolver : public CTFWeaponBaseGun
+{
+public:
+
+ DECLARE_CLASS( CTFRevolver, CTFWeaponBaseGun );
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+
+// Server specific.
+#ifdef GAME_DLL
+ DECLARE_DATADESC();
+#endif
+
+ CTFRevolver();
+ ~CTFRevolver() {}
+
+ virtual int GetWeaponID( void ) const { return TF_WEAPON_REVOLVER; }
+ virtual int GetDamageType( void ) const;
+
+ virtual bool CanFireCriticalShot( bool bIsHeadshot );
+
+ virtual void PrimaryAttack( void );
+ virtual float GetWeaponSpread( void );
+
+ virtual bool DefaultReload( int iClipSize1, int iClipSize2, int iActivity );
+
+ bool CanHeadshot( void ) const { int iMode = 0; CALL_ATTRIB_HOOK_INT( iMode, set_weapon_mode ); return (iMode == 1); };
+
+ bool SapperKillsCollectCrits( void ) const { int iMode = 0; CALL_ATTRIB_HOOK_INT( iMode, sapper_kills_collect_crits ); return (iMode == 1); };
+
+ virtual bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
+ virtual bool Deploy( void );
+
+ int GetCount( void );
+ const char* GetEffectLabelText( void );
+ float GetProgress( void ) { return 0.f; }
+
+#ifdef CLIENT_DLL
+ virtual void GetWeaponCrosshairScale( float &flScale );
+#else
+ virtual void Detach();
+ virtual float GetProjectileDamage( void );
+#endif
+
+private:
+
+ CTFRevolver( const CTFRevolver & ) {}
+
+ float m_flLastAccuracyCheck;
+ float m_flAccuracyCheckTime;
+};
+
+
+//=============================================================================
+// Secondary Revolver (Engy)
+class CTFRevolver_Secondary : public CTFRevolver
+{
+public:
+ DECLARE_CLASS( CTFRevolver_Secondary, CTFRevolver );
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+};
+
+#endif // TF_WEAPON_REVOLVER_H \ No newline at end of file