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.

52 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef C_TF_PASSTIME_BALL_H
  8. #define C_TF_PASSTIME_BALL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "predictable_entity.h"
  13. #include "util_shared.h"
  14. #include "c_baseanimating.h"
  15. #include "../shared/SpriteTrail.h"
  16. class C_TFPlayer;
  17. //-----------------------------------------------------------------------------
  18. class C_PasstimeBall : public C_BaseAnimating
  19. {
  20. public:
  21. DECLARE_CLASS( C_PasstimeBall, C_BaseAnimating );
  22. DECLARE_NETWORKCLASS();
  23. C_PasstimeBall();
  24. virtual ~C_PasstimeBall();
  25. virtual void OnDataChanged( DataUpdateType_t updateType ) OVERRIDE;
  26. virtual int DrawModel( int flags ) OVERRIDE;
  27. virtual unsigned int PhysicsSolidMaskForEntity() const OVERRIDE;
  28. virtual bool ShouldCollide( int collisionGroup, int contentsMask ) const OVERRIDE;
  29. virtual void AddDecal( const Vector& rayStart, const Vector& rayEnd,
  30. const Vector& decalCenter, int hitbox, int decalIndex, bool doTrace,
  31. trace_t& tr, int maxLODToDecal ) OVERRIDE { }// no decals ever
  32. int GetCollisionCount() const { return m_iCollisionCount; }
  33. C_TFPlayer *GetHomingTarget() const { return m_hHomingTarget; }
  34. C_TFPlayer *GetCarrier();
  35. C_TFPlayer *GetPrevCarrier();
  36. private:
  37. bool m_bWasVisible;
  38. float m_fDrawTime;
  39. CNetworkVar( int, m_iCollisionCount );
  40. CNetworkHandle( C_TFPlayer, m_hHomingTarget );
  41. CNetworkHandle( C_TFPlayer, m_hCarrier );
  42. CNetworkHandle( C_TFPlayer, m_hPrevCarrier );
  43. };
  44. #endif // C_TF_PASSTIME_BALL_H