Counter Strike : Global Offensive Source Code
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.

59 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef TF_PLAYERANIMSTATE_H
  7. #define TF_PLAYERANIMSTATE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "convar.h"
  12. #include "iplayeranimstate.h"
  13. #include "base_playeranimstate.h"
  14. #ifdef CLIENT_DLL
  15. class C_BaseAnimatingOverlay;
  16. class C_WeaponCSBase;
  17. #define CBaseAnimatingOverlay C_BaseAnimatingOverlay
  18. #define CWeaponCSBase C_WeaponCSBase
  19. #define CCSPlayer C_CSPlayer
  20. #else
  21. class CBaseAnimatingOverlay;
  22. class CWeaponCSBase;
  23. class CCSPlayer;
  24. #endif
  25. // When moving this fast, he plays run anim.
  26. #define ARBITRARY_RUN_SPEED 175.0f
  27. #define HOSTAGE_JUMP_POWER 200.0f
  28. #define HOSTAGE_ANIM_MODEL "models/hostage/hostage.mdl"
  29. #define MOVESTATE_IDLE 0
  30. #define MOVESTATE_WALK 1
  31. #define MOVESTATE_RUN 2
  32. // This abstracts the differences between CS players and hostages.
  33. class ICSPlayerAnimStateHelpers
  34. {
  35. public:
  36. virtual CWeaponCSBase* CSAnim_GetActiveWeapon() = 0;
  37. virtual bool CSAnim_CanMove() = 0;
  38. };
  39. IPlayerAnimState* CreatePlayerAnimState( CBaseAnimatingOverlay *pEntity, ICSPlayerAnimStateHelpers *pHelpers, LegAnimType_t legAnimType, bool bUseAimSequences );
  40. IPlayerAnimState* CreateHostageAnimState( CBaseAnimatingOverlay *pEntity, ICSPlayerAnimStateHelpers *pHelpers, LegAnimType_t legAnimType, bool bUseAimSequences );
  41. // If this is set, then the game code needs to make sure to send player animation events
  42. // to the local player if he's the one being watched.
  43. extern ConVar cl_showanimstate;
  44. #endif // TF_PLAYERANIMSTATE_H