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.

69 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef C_TFC_PLAYER_H
  7. #define C_TFC_PLAYER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tfc_playeranimstate.h"
  12. #include "c_baseplayer.h"
  13. #include "tfc_shareddefs.h"
  14. #include "baseparticleentity.h"
  15. #include "tfc_player_shared.h"
  16. class C_TFCPlayer : public C_BasePlayer
  17. {
  18. public:
  19. DECLARE_CLASS( C_TFCPlayer, C_BasePlayer );
  20. DECLARE_CLIENTCLASS();
  21. DECLARE_PREDICTABLE();
  22. DECLARE_INTERPOLATION();
  23. C_TFCPlayer();
  24. ~C_TFCPlayer();
  25. static C_TFCPlayer* GetLocalTFCPlayer();
  26. virtual const QAngle& GetRenderAngles();
  27. virtual void UpdateClientSideAnimation();
  28. virtual void PostDataUpdate( DataUpdateType_t updateType );
  29. virtual void ProcessMuzzleFlashEvent();
  30. public:
  31. CTFCPlayerShared m_Shared;
  32. // Called by shared code.
  33. public:
  34. void DoAnimationEvent( PlayerAnimEvent_t event, int nData );
  35. ITFCPlayerAnimState *m_PlayerAnimState;
  36. QAngle m_angEyeAngles;
  37. CInterpolatedVar< QAngle > m_iv_angEyeAngles;
  38. private:
  39. C_TFCPlayer( const C_TFCPlayer & );
  40. };
  41. inline C_TFCPlayer* ToTFCPlayer( CBasePlayer *pPlayer )
  42. {
  43. Assert( dynamic_cast< C_TFCPlayer* >( pPlayer ) != NULL );
  44. return static_cast< C_TFCPlayer* >( pPlayer );
  45. }
  46. #endif // C_TFC_PLAYER_H