Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
985 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "dlight.h"
  8. #include "tempent.h"
  9. #include "iefx.h"
  10. #include "c_te_legacytempents.h"
  11. #include "basegrenade_shared.h"
  12. class C_RpgRocket : public C_BaseGrenade
  13. {
  14. public:
  15. DECLARE_CLASS( C_RpgRocket, C_BaseGrenade );
  16. DECLARE_CLIENTCLASS();
  17. public:
  18. C_RpgRocket( void ) { }
  19. C_RpgRocket( const C_RpgRocket & );
  20. public:
  21. void CreateLightEffects( void );
  22. };
  23. IMPLEMENT_CLIENTCLASS_DT( C_RpgRocket, DT_RpgRocket, CRpgRocket )
  24. END_RECV_TABLE()
  25. void C_RpgRocket::CreateLightEffects( void )
  26. {
  27. dlight_t *dl;
  28. if ( IsEffectActive(EF_DIMLIGHT) )
  29. {
  30. dl = effects->CL_AllocDlight ( index );
  31. dl->origin = GetAbsOrigin();
  32. dl->color.r = dl->color.g = dl->color.b = 100;
  33. dl->radius = 200;
  34. dl->die = gpGlobals->curtime + 0.001;
  35. tempents->RocketFlare( GetAbsOrigin() );
  36. }
  37. }