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.

62 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: CTF AmmoPack.
  4. //
  5. //=============================================================================//
  6. #ifndef TF_HALLOWEEN_SOULS_PICUP_H
  7. #define TF_HALLOWEEN_SOULS_PICUP_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #ifdef CLIENT_DLL
  12. #define CHalloweenSoulPack C_HalloweenSoulPack
  13. #endif
  14. class CHalloweenSoulPack : public CBaseEntity
  15. {
  16. public:
  17. DECLARE_CLASS( CHalloweenSoulPack, CBaseEntity )
  18. DECLARE_NETWORKCLASS();
  19. DECLARE_PREDICTABLE();
  20. CHalloweenSoulPack();
  21. ~CHalloweenSoulPack();
  22. virtual void Spawn() OVERRIDE;
  23. virtual void Precache() OVERRIDE;
  24. #ifdef GAME_DLL
  25. void SetAmount( int nAmount ) { m_nAmount = nAmount; }
  26. void SetFlyDuration( float flDuration ) { m_flDuration = flDuration; }
  27. void SetTarget( CBaseEntity *pTarget ) { m_hTarget = pTarget; }
  28. void ItemTouch( CBaseEntity *pOther );
  29. virtual int UpdateTransmitState() OVERRIDE;
  30. #else
  31. virtual void OnDataChanged( DataUpdateType_t type ) OVERRIDE;
  32. virtual void ClientThink() OVERRIDE;
  33. #endif
  34. private:
  35. void FlyThink( void );
  36. void FlyTowardsTargetEntity( void );
  37. void InitSplineData( void );
  38. #ifdef GAME_DLL
  39. int m_nAmount;
  40. const char *m_pszParticleName;
  41. #endif
  42. CNetworkHandle( CBaseEntity, m_hTarget );
  43. float m_flCreationTime;
  44. CNetworkVector( m_vecPreCurvePos );
  45. CNetworkVector( m_vecStartCurvePos );
  46. CNetworkVar( float, m_flDuration );
  47. };
  48. #endif // TF_HALLOWEEN_SOULS_PICUP_H