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:
  4. //
  5. //=============================================================================//
  6. #ifndef DOD_PLAYERANIMSTATE_H
  7. #define DOD_PLAYERANIMSTATE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "convar.h"
  12. #include "iplayeranimstate.h"
  13. #if defined( CLIENT_DLL )
  14. class C_DODPlayer;
  15. #define CDODPlayer C_DODPlayer
  16. #else
  17. class CDODPlayer;
  18. #endif
  19. enum PlayerAnimEvent_t
  20. {
  21. PLAYERANIMEVENT_FIRE_GUN=0,
  22. PLAYERANIMEVENT_THROW_GRENADE,
  23. PLAYERANIMEVENT_ROLL_GRENADE,
  24. PLAYERANIMEVENT_JUMP,
  25. PLAYERANIMEVENT_RELOAD,
  26. PLAYERANIMEVENT_SECONDARY_ATTACK,
  27. PLAYERANIMEVENT_HANDSIGNAL,
  28. PLAYERANIMEVENT_PLANT_TNT,
  29. PLAYERANIMEVENT_DEFUSE_TNT,
  30. PLAYERANIMEVENT_HS_NONE,
  31. PLAYERANIMEVENT_CANCEL_GESTURES, // cancel current gesture
  32. PLAYERANIMEVENT_COUNT
  33. };
  34. class IDODPlayerAnimState : virtual public IPlayerAnimState
  35. {
  36. public:
  37. // This is called by both the client and the server in the same way to trigger events for
  38. // players firing, jumping, throwing grenades, etc.
  39. virtual void DoAnimationEvent( PlayerAnimEvent_t event, int nData = 0 ) = 0;
  40. virtual void ShowDebugInfo( void ) = 0;
  41. };
  42. IDODPlayerAnimState* CreatePlayerAnimState( CDODPlayer *pPlayer );
  43. // If this is set, then the game code needs to make sure to send player animation events
  44. // to the local player if he's the one being watched.
  45. extern ConVar cl_showanimstate;
  46. #endif // DOD_PLAYERANIMSTATE_H