summaryrefslogtreecommitdiff
path: root/game/shared/tf/tf_weapon_grenade_gas.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_grenade_gas.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_grenade_gas.h')
-rw-r--r--game/shared/tf/tf_weapon_grenade_gas.h119
1 files changed, 119 insertions, 0 deletions
diff --git a/game/shared/tf/tf_weapon_grenade_gas.h b/game/shared/tf/tf_weapon_grenade_gas.h
new file mode 100644
index 0000000..3cc6878
--- /dev/null
+++ b/game/shared/tf/tf_weapon_grenade_gas.h
@@ -0,0 +1,119 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: TF Gas Grenade.
+//
+//=============================================================================//
+#ifndef TF_WEAPON_GRENADE_GAS_H
+#define TF_WEAPON_GRENADE_GAS_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tf_weaponbase_grenade.h"
+#include "tf_weaponbase_grenadeproj.h"
+
+// Client specific.
+#ifdef CLIENT_DLL
+#define CTFGrenadeGas C_TFGrenadeGas
+#endif
+
+//=============================================================================
+//
+// TF Gas Grenade
+//
+class CTFGrenadeGas : public CTFWeaponBaseGrenade
+{
+public:
+
+ DECLARE_CLASS( CTFGrenadeGas, CTFWeaponBaseGrenade );
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+// DECLARE_ACTTABLE();
+
+ CTFGrenadeGas() {}
+
+ // Unique identifier.
+ virtual int GetWeaponID( void ) const { return TF_WEAPON_GRENADE_GAS; }
+
+// Server specific.
+#ifdef GAME_DLL
+
+ DECLARE_DATADESC();
+
+ virtual CTFWeaponBaseGrenadeProj *EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, float flTime, int iflags = 0 );
+
+#endif
+
+ CTFGrenadeGas( const CTFGrenadeGas & ) {}
+};
+
+#ifdef CLIENT_DLL
+ #define CTFGasGrenadeEffect C_TFGasGrenadeEffect
+#endif
+
+class CTFGasGrenadeEffect : public CBaseEntity
+{
+public:
+ DECLARE_CLASS( CTFGasGrenadeEffect, CBaseEntity );
+ DECLARE_NETWORKCLASS();
+
+#ifndef CLIENT_DLL
+
+ virtual int UpdateTransmitState( void );
+
+#else
+
+ CTFGasGrenadeEffect()
+ {
+ m_pGasEffect = NULL;
+ }
+
+ virtual void OnDataChanged( DataUpdateType_t updateType );
+
+ CNewParticleEffect *m_pGasEffect;
+
+#endif
+
+};
+
+//=============================================================================
+//
+// TF Gase Grenade Projectile (Server specific.)
+//
+#ifdef GAME_DLL
+
+class CTFGrenadeGasProjectile : public CTFWeaponBaseGrenadeProj
+{
+public:
+
+ DECLARE_CLASS( CTFGrenadeGasProjectile, CTFWeaponBaseGrenadeProj );
+ DECLARE_DATADESC();
+
+ ~CTFGrenadeGasProjectile();
+
+ // Unique identifier.
+ virtual int GetWeaponID( void ) const { return TF_WEAPON_GRENADE_GAS; }
+
+ // Creation.
+ static CTFGrenadeGasProjectile *Create( const Vector &position, const QAngle &angles, const Vector &velocity,
+ const AngularImpulse &angVelocity, CBaseCombatCharacter *pOwner, const CTFWeaponInfo &weaponInfo, float timer, int iFlags = 0 );
+
+ // Overrides.
+ virtual void Spawn();
+ virtual void Precache();
+ virtual void BounceSound( void );
+ virtual void Detonate();
+ virtual void DetonateThink( void );
+
+ void Think_Emit( void );
+ void Think_Fade( void );
+
+private:
+ int m_nPulses;
+
+ CHandle<CTFGasGrenadeEffect> m_hGasEffect;
+};
+
+#endif
+
+#endif // TF_WEAPON_GRENADE_GAS_H