Counter Strike : Global Offensive Source Code
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.

55 lines
1.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "weapon_csbase.h"
  8. #include "gamerules.h"
  9. #include "npcevent.h"
  10. #include "engine/IEngineSound.h"
  11. #include "weapon_hegrenade.h"
  12. #ifdef CLIENT_DLL
  13. #else
  14. #include "cs_player.h"
  15. #include "items.h"
  16. #include "hegrenade_projectile.h"
  17. #endif
  18. // NOTE: This has to be the last file included!
  19. #include "tier0/memdbgon.h"
  20. #define GRENADE_TIMER 3.0f //Seconds
  21. IMPLEMENT_NETWORKCLASS_ALIASED( HEGrenade, DT_HEGrenade )
  22. BEGIN_NETWORK_TABLE(CHEGrenade, DT_HEGrenade)
  23. END_NETWORK_TABLE()
  24. BEGIN_PREDICTION_DATA( CHEGrenade )
  25. END_PREDICTION_DATA()
  26. LINK_ENTITY_TO_CLASS_ALIASED( weapon_hegrenade, HEGrenade );
  27. PRECACHE_REGISTER( weapon_hegrenade );
  28. #ifndef CLIENT_DLL
  29. BEGIN_DATADESC( CHEGrenade )
  30. END_DATADESC()
  31. void CHEGrenade::EmitGrenade( Vector vecSrc, QAngle vecAngles, Vector vecVel, AngularImpulse angImpulse, CBasePlayer *pPlayer, const CCSWeaponInfo& weaponInfo )
  32. {
  33. CHEGrenadeProjectile::Create( vecSrc, vecAngles, vecVel, angImpulse, pPlayer, weaponInfo, GRENADE_TIMER );
  34. }
  35. #endif