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.

53 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef HL1_PLAYER_SHARED_H
  7. #define HL1_PLAYER_SHARED_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "cbase.h"
  12. #include "base_playeranimstate.h"
  13. // Shared header file for players
  14. #if defined( CLIENT_DLL )
  15. //#define CHL1_Player C_BaseHLPlayer //FIXME: Lovely naming job between server and client here...
  16. class C_HL1MP_Player;
  17. #define CHL1MP_Player C_HL1MP_Player
  18. #else
  19. //#include "hl1_player.h"
  20. class CHL1MP_Player;
  21. #endif
  22. #include "studio.h"
  23. enum PlayerAnimEvent_t
  24. {
  25. PLAYERANIMEVENT_FIRE_GUN=0,
  26. PLAYERANIMEVENT_THROW_GRENADE,
  27. PLAYERANIMEVENT_JUMP,
  28. PLAYERANIMEVENT_RELOAD,
  29. PLAYERANIMEVENT_DIE,
  30. PLAYERANIMEVENT_COUNT
  31. };
  32. class IHL1MPPlayerAnimState : virtual public IPlayerAnimState
  33. {
  34. public:
  35. // This is called by both the client and the server in the same way to trigger events for
  36. // players firing, jumping, throwing grenades, etc.
  37. virtual void DoAnimationEvent( PlayerAnimEvent_t event, int nData ) = 0;
  38. };
  39. IHL1MPPlayerAnimState* CreatePlayerAnimState( CHL1MP_Player *pPlayer );
  40. // If this is set, then the game code needs to make sure to send player animation events
  41. // to the local player if he's the one being watched.
  42. extern ConVar cl_showanimstate;
  43. #endif // HL1_PLAYER_SHARED_H