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.

51 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Base class for simple projectiles
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CBASESPRITEPROJECTILE_H
  8. #define CBASESPRITEPROJECTILE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "Sprite.h"
  13. enum MoveType_t;
  14. enum MoveCollide_t;
  15. //=============================================================================
  16. //=============================================================================
  17. class CBaseSpriteProjectile : public CSprite
  18. {
  19. DECLARE_DATADESC();
  20. DECLARE_CLASS( CBaseSpriteProjectile, CSprite );
  21. public:
  22. void Touch( CBaseEntity *pOther );
  23. virtual void HandleTouch( CBaseEntity *pOther );
  24. void Think();
  25. virtual void HandleThink();
  26. void Spawn( char *pszModel,
  27. const Vector &vecOrigin,
  28. const Vector &vecVelocity,
  29. edict_t *pOwner,
  30. MoveType_t iMovetype,
  31. MoveCollide_t nMoveCollide,
  32. int iDamage,
  33. int iDamageType,
  34. CBaseEntity *pIntendedTarget = NULL );
  35. virtual void Precache( void ) {};
  36. int m_iDmg;
  37. int m_iDmgType;
  38. EHANDLE m_hIntendedTarget;
  39. };
  40. #endif // CBASESPRITEPROJECTILE_H