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.

47 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef IPLAYERANIMSTATE_H
  7. #define IPLAYERANIMSTATE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. typedef enum
  12. {
  13. LEGANIM_9WAY, // Legs use a 9-way blend, with "move_x" and "move_y" pose parameters.
  14. LEGANIM_8WAY, // Legs use an 8-way blend with "move_yaw" pose param.
  15. LEGANIM_GOLDSRC // Legs always point in the direction he's running and the torso rotates.
  16. } LegAnimType_t;
  17. abstract_class IPlayerAnimState
  18. {
  19. public:
  20. virtual void Release() = 0;
  21. // Update() and DoAnimationEvent() together maintain the entire player's animation state.
  22. //
  23. // Update() maintains the the lower body animation (the player's m_nSequence)
  24. // and the upper body overlay based on the player's velocity and look direction.
  25. //
  26. // It also modulates these based on events triggered by DoAnimationEvent.
  27. virtual void Update( float eyeYaw, float eyePitch ) = 0;
  28. // This is called by the client when a new player enters the PVS to clear any events
  29. // the dormant version of the entity may have been playing.
  30. virtual void ClearAnimationState() = 0;
  31. // The client uses this to figure out what angles to render the entity with (since as the guy turns,
  32. // it will change his body_yaw pose parameter before changing his rendered angle).
  33. virtual const QAngle& GetRenderAngles() = 0;
  34. };
  35. #endif // IPLAYERANIMSTATE_H