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_explodinghandgrenade.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_explodinghandgrenade.cpp')
| -rw-r--r-- | game/shared/dod/weapon_explodinghandgrenade.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/game/shared/dod/weapon_explodinghandgrenade.cpp b/game/shared/dod/weapon_explodinghandgrenade.cpp new file mode 100644 index 0000000..379f725 --- /dev/null +++ b/game/shared/dod/weapon_explodinghandgrenade.cpp @@ -0,0 +1,52 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "cbase.h" +#include "weapon_dodbasegrenade.h" + +#ifdef CLIENT_DLL + #define CWeaponExplodingHandGrenade C_WeaponExplodingHandGrenade +#else + #include "dod_handgrenade.h" //the thing that we throw +#endif + + +class CWeaponExplodingHandGrenade : public CWeaponDODBaseGrenade +{ +public: + DECLARE_CLASS( CWeaponExplodingHandGrenade, CWeaponDODBaseGrenade ); + DECLARE_NETWORKCLASS(); + DECLARE_PREDICTABLE(); + + CWeaponExplodingHandGrenade() {} + + virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_FRAG_US_LIVE; } + +#ifndef CLIENT_DLL + + virtual void EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, float flLifeTime = GRENADE_FUSE_LENGTH ) + { + CDODHandGrenade::Create( vecSrc, vecAngles, vecVel, angImpulse, pPlayer, flLifeTime, GetWeaponID() ); + } + +#endif + + virtual bool IsArmed( void ) { return true; } + +private: + CWeaponExplodingHandGrenade( const CWeaponExplodingHandGrenade & ); +}; + +IMPLEMENT_NETWORKCLASS_ALIASED( WeaponExplodingHandGrenade, DT_WeaponExplodingHandGrenade ) + +BEGIN_NETWORK_TABLE(CWeaponExplodingHandGrenade, DT_WeaponExplodingHandGrenade) +END_NETWORK_TABLE() + +BEGIN_PREDICTION_DATA( CWeaponExplodingHandGrenade ) //MATTTODO: are these necessary? +END_PREDICTION_DATA() + +LINK_ENTITY_TO_CLASS( weapon_frag_us_live, CWeaponExplodingHandGrenade ); +PRECACHE_WEAPON_REGISTER( weapon_frag_us_live );
\ No newline at end of file |