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.

55 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef TFC_PLAYERANIMSTATE_H
  7. #define TFC_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_TFCPlayer;
  15. #define CTFCPlayer C_TFCPlayer
  16. #else
  17. class CTFCPlayer;
  18. #endif
  19. enum PlayerAnimEvent_t
  20. {
  21. PLAYERANIMEVENT_FIRE_GUN=0,
  22. PLAYERANIMEVENT_THROW_GRENADE,
  23. PLAYERANIMEVENT_JUMP,
  24. PLAYERANIMEVENT_RELOAD,
  25. PLAYERANIMEVENT_DIE,
  26. PLAYERANIMEVENT_COUNT
  27. };
  28. class ITFCPlayerAnimState : virtual public IPlayerAnimState
  29. {
  30. public:
  31. // This is called by both the client and the server in the same way to trigger events for
  32. // players firing, jumping, throwing grenades, etc.
  33. virtual void DoAnimationEvent( PlayerAnimEvent_t event, int nData ) = 0;
  34. };
  35. ITFCPlayerAnimState* CreatePlayerAnimState( CTFCPlayer *pPlayer );
  36. // If this is set, then the game code needs to make sure to send player animation events
  37. // to the local player if he's the one being watched.
  38. extern ConVar cl_showanimstate;
  39. #endif // TFC_PLAYERANIMSTATE_H