diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/dod/weapon_smokegrenade_ger.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/dod/weapon_smokegrenade_ger.cpp')
| -rw-r--r-- | game/shared/dod/weapon_smokegrenade_ger.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/game/shared/dod/weapon_smokegrenade_ger.cpp b/game/shared/dod/weapon_smokegrenade_ger.cpp new file mode 100644 index 0000000..6d9e310 --- /dev/null +++ b/game/shared/dod/weapon_smokegrenade_ger.cpp @@ -0,0 +1,55 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "cbase.h" +#include "weapon_dodbasegrenade.h" + +#ifdef CLIENT_DLL +#define CWeaponSmokeGrenadeGER C_WeaponSmokeGrenadeGER +#else +#include "dod_smokegrenade_ger.h" //the thing that we throw +#endif + +class CWeaponSmokeGrenadeGER : public CWeaponDODBaseGrenade +{ +public: + DECLARE_CLASS( CWeaponSmokeGrenadeGER, CWeaponDODBaseGrenade ); + DECLARE_NETWORKCLASS(); + DECLARE_PREDICTABLE(); + + CWeaponSmokeGrenadeGER() {} + + virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_SMOKE_GER; } + +#ifndef CLIENT_DLL + + virtual void EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, float flLifeTime = GRENADE_FUSE_LENGTH ) + { + // align the stickgrenade vertically and spin end over end + QAngle vecNewAngles = QAngle(45,pPlayer->EyeAngles().y,0); + AngularImpulse angNewImpulse = AngularImpulse( 0, 600, 0 ); + + CDODSmokeGrenadeGER::Create( vecSrc, vecNewAngles, vecVel, angNewImpulse, pPlayer ); + } + +#endif + + virtual float GetDetonateTimerLength( void ) { return 10; } + +private: + CWeaponSmokeGrenadeGER( const CWeaponSmokeGrenadeGER & ) {} +}; + +IMPLEMENT_NETWORKCLASS_ALIASED( WeaponSmokeGrenadeGER, DT_WeaponSmokeGrenadeGER ) + +BEGIN_NETWORK_TABLE(CWeaponSmokeGrenadeGER, DT_WeaponSmokeGrenadeGER) +END_NETWORK_TABLE() + +BEGIN_PREDICTION_DATA( CWeaponSmokeGrenadeGER ) +END_PREDICTION_DATA() + +LINK_ENTITY_TO_CLASS( weapon_smoke_ger, CWeaponSmokeGrenadeGER ); +PRECACHE_WEAPON_REGISTER( weapon_smoke_ger );
\ No newline at end of file |