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/client/hl1/hl1_c_rpg_rocket.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/hl1/hl1_c_rpg_rocket.cpp')
| -rw-r--r-- | game/client/hl1/hl1_c_rpg_rocket.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/game/client/hl1/hl1_c_rpg_rocket.cpp b/game/client/hl1/hl1_c_rpg_rocket.cpp new file mode 100644 index 0000000..c8dc3ee --- /dev/null +++ b/game/client/hl1/hl1_c_rpg_rocket.cpp @@ -0,0 +1,48 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + + +#include "cbase.h" +#include "dlight.h" +#include "tempent.h" +#include "iefx.h" +#include "c_te_legacytempents.h" +#include "basegrenade_shared.h" + + +class C_RpgRocket : public C_BaseGrenade +{ +public: + DECLARE_CLASS( C_RpgRocket, C_BaseGrenade ); + DECLARE_CLIENTCLASS(); + +public: + C_RpgRocket( void ) { } + C_RpgRocket( const C_RpgRocket & ); + +public: + void CreateLightEffects( void ); +}; + + +IMPLEMENT_CLIENTCLASS_DT( C_RpgRocket, DT_RpgRocket, CRpgRocket ) +END_RECV_TABLE() + + +void C_RpgRocket::CreateLightEffects( void ) +{ + dlight_t *dl; + if ( IsEffectActive(EF_DIMLIGHT) ) + { + dl = effects->CL_AllocDlight ( index ); + dl->origin = GetAbsOrigin(); + dl->color.r = dl->color.g = dl->color.b = 100; + dl->radius = 200; + dl->die = gpGlobals->curtime + 0.001; + + tempents->RocketFlare( GetAbsOrigin() ); + } +} |