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.

51 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //
  4. //
  5. //=============================================================================
  6. #ifndef MERASMUS_BODY_H
  7. #define MERASMUS_BODY_H
  8. #include "animation.h"
  9. #include "NextBotBodyInterface.h"
  10. class INextBot;
  11. //----------------------------------------------------------------------------------------------------------------
  12. /**
  13. * The interface for control and information about the bot's body state (posture, animation state, etc)
  14. */
  15. class CMerasmusBody : public IBody
  16. {
  17. public:
  18. CMerasmusBody( INextBot *bot );
  19. virtual ~CMerasmusBody() { }
  20. virtual void Update( void );
  21. virtual bool StartActivity( Activity act, unsigned int flags = 0 );
  22. virtual Activity GetActivity( void ) const; // return currently animating activity
  23. virtual bool IsActivity( Activity act ) const; // return true if currently animating activity matches the given one
  24. virtual unsigned int GetSolidMask( void ) const; // return the bot's collision mask (hack until we get a general hull trace abstraction here or in the locomotion interface)
  25. private:
  26. int m_currentActivity;
  27. int m_moveXPoseParameter;
  28. int m_moveYPoseParameter;
  29. };
  30. inline Activity CMerasmusBody::GetActivity( void ) const
  31. {
  32. return (Activity)m_currentActivity;
  33. }
  34. inline bool CMerasmusBody::IsActivity( Activity act ) const
  35. {
  36. return act == m_currentActivity ? true : false;
  37. }
  38. #endif // MERASMUS_BODY_H