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.

49 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef C_HL1_PLAYER_H
  7. #define C_HL1_PLAYER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "c_baseplayer.h"
  12. #define CHL1_Player C_HL1_Player
  13. class C_HL1_Player : public C_BasePlayer
  14. {
  15. public:
  16. DECLARE_CLASS( C_HL1_Player, C_BasePlayer );
  17. DECLARE_CLIENTCLASS();
  18. C_HL1_Player();
  19. bool IsPullingObject() { return m_bIsPullingObject; }
  20. CNetworkVar( bool, m_bHasLongJump );
  21. CNetworkVar( int, m_nFlashBattery );
  22. CNetworkVar( bool, m_bIsPullingObject );
  23. CNetworkVar( float, m_flStartCharge );
  24. CNetworkVar( float, m_flAmmoStartCharge );
  25. CNetworkVar( float, m_flPlayAftershock );
  26. CNetworkVar( float, m_flNextAmmoBurn ); // while charging, when to absorb another unit of player's ammo?
  27. private:
  28. C_HL1_Player( const C_HL1_Player & );
  29. };
  30. inline C_HL1_Player *ToHL1Player( CBaseEntity *pEntity )
  31. {
  32. if ( !pEntity || !pEntity->IsPlayer() )
  33. return NULL;
  34. return dynamic_cast<C_HL1_Player*>( pEntity );
  35. }
  36. #endif //C_HL1_PLAYER_H