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. #ifndef HEADLESS_HATMAN_BODY_H
  3. #define HEADLESS_HATMAN_BODY_H
  4. #include "animation.h"
  5. #include "NextBotBodyInterface.h"
  6. class INextBot;
  7. //----------------------------------------------------------------------------------------------------------------
  8. /**
  9. * The interface for control and information about the bot's body state (posture, animation state, etc)
  10. */
  11. class CHeadlessHatmanBody : public IBody
  12. {
  13. public:
  14. CHeadlessHatmanBody( INextBot *bot );
  15. virtual ~CHeadlessHatmanBody() { }
  16. virtual void Update( void );
  17. virtual bool StartActivity( Activity act, unsigned int flags = 0 );
  18. virtual Activity GetActivity( void ) const; // return currently animating activity
  19. virtual bool IsActivity( Activity act ) const; // return true if currently animating activity matches the given one
  20. 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)
  21. private:
  22. int m_currentActivity;
  23. int m_moveXPoseParameter;
  24. int m_moveYPoseParameter;
  25. };
  26. inline Activity CHeadlessHatmanBody::GetActivity( void ) const
  27. {
  28. return (Activity)m_currentActivity;
  29. }
  30. inline bool CHeadlessHatmanBody::IsActivity( Activity act ) const
  31. {
  32. return act == m_currentActivity ? true : false;
  33. }
  34. #endif // HEADLESS_HATMAN_BODY_H