summaryrefslogtreecommitdiff
path: root/game/shared/dod/weapon_smokegrenade_us.cpp
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_smokegrenade_us.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/dod/weapon_smokegrenade_us.cpp')
-rw-r--r--game/shared/dod/weapon_smokegrenade_us.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/game/shared/dod/weapon_smokegrenade_us.cpp b/game/shared/dod/weapon_smokegrenade_us.cpp
new file mode 100644
index 0000000..69c71ce
--- /dev/null
+++ b/game/shared/dod/weapon_smokegrenade_us.cpp
@@ -0,0 +1,51 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#include "cbase.h"
+#include "weapon_dodbasegrenade.h"
+
+#ifdef CLIENT_DLL
+ #define CWeaponSmokeGrenadeUS C_WeaponSmokeGrenadeUS
+#else
+ #include "dod_smokegrenade_us.h" //the thing that we throw
+#endif
+
+class CWeaponSmokeGrenadeUS : public CWeaponDODBaseGrenade
+{
+public:
+ DECLARE_CLASS( CWeaponSmokeGrenadeUS, CWeaponDODBaseGrenade );
+ DECLARE_NETWORKCLASS();
+ DECLARE_PREDICTABLE();
+
+ CWeaponSmokeGrenadeUS() {}
+
+ virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_SMOKE_US; }
+
+#ifndef CLIENT_DLL
+
+ virtual void EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, float flLifeTime = GRENADE_FUSE_LENGTH )
+ {
+ CDODSmokeGrenadeUS::Create( vecSrc, vecAngles, vecVel, angImpulse, pPlayer );
+ }
+
+#endif
+
+ virtual float GetDetonateTimerLength( void ) { return 10; }
+
+private:
+ CWeaponSmokeGrenadeUS( const CWeaponSmokeGrenadeUS & ) {}
+};
+
+IMPLEMENT_NETWORKCLASS_ALIASED( WeaponSmokeGrenadeUS, DT_WeaponSmokeGrenadeUS )
+
+BEGIN_NETWORK_TABLE(CWeaponSmokeGrenadeUS, DT_WeaponSmokeGrenadeUS)
+END_NETWORK_TABLE()
+
+BEGIN_PREDICTION_DATA( CWeaponSmokeGrenadeUS )
+END_PREDICTION_DATA()
+
+LINK_ENTITY_TO_CLASS( weapon_smoke_us, CWeaponSmokeGrenadeUS );
+PRECACHE_WEAPON_REGISTER( weapon_smoke_us ); \ No newline at end of file