summaryrefslogtreecommitdiff
path: root/game/server/tf/bot_npc/bot_npc_body.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/tf/bot_npc/bot_npc_body.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/tf/bot_npc/bot_npc_body.h')
-rw-r--r--game/server/tf/bot_npc/bot_npc_body.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/game/server/tf/bot_npc/bot_npc_body.h b/game/server/tf/bot_npc/bot_npc_body.h
new file mode 100644
index 0000000..3d58bee
--- /dev/null
+++ b/game/server/tf/bot_npc/bot_npc_body.h
@@ -0,0 +1,64 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+#ifndef BOT_NPC_BODY_H
+#define BOT_NPC_BODY_H
+
+#include "animation.h"
+#include "NextBotBodyInterface.h"
+
+class INextBot;
+
+
+//----------------------------------------------------------------------------------------------------------------
+/**
+ * The interface for control and information about the bot's body state (posture, animation state, etc)
+ */
+class CBotNPCBody : public IBody
+{
+public:
+ CBotNPCBody( INextBot *bot );
+ virtual ~CBotNPCBody() { }
+
+ virtual void Update( void );
+
+ virtual bool StartActivity( Activity act, unsigned int flags = 0 );
+ virtual Activity GetActivity( void ) const; // return currently animating activity
+ virtual bool IsActivity( Activity act ) const; // return true if currently animating activity matches the given one
+
+ virtual void AimHeadTowards( const Vector &lookAtPos,
+ LookAtPriorityType priority = BORING,
+ float duration = 0.0f,
+ INextBotReply *replyWhenAimed = NULL,
+ const char *reason = NULL ); // aim the bot's head towards the given goal
+ virtual void AimHeadTowards( CBaseEntity *subject,
+ LookAtPriorityType priority = BORING,
+ float duration = 0.0f,
+ INextBotReply *replyWhenAimed = NULL,
+ const char *reason = NULL ); // continually aim the bot's head towards the given subject
+
+ 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)
+ virtual unsigned int GetCollisionGroup( void ) const;
+
+private:
+ int m_currentActivity;
+ int m_moveXPoseParameter;
+ int m_moveYPoseParameter;
+ QAngle m_desiredAimAngles;
+};
+
+
+inline Activity CBotNPCBody::GetActivity( void ) const
+{
+ return (Activity)m_currentActivity;
+}
+
+inline bool CBotNPCBody::IsActivity( Activity act ) const
+{
+ return act == m_currentActivity ? true : false;
+}
+
+inline unsigned int CBotNPCBody::GetCollisionGroup( void ) const
+{
+ return COLLISION_GROUP_PLAYER_MOVEMENT;
+}
+
+#endif // BOT_NPC_BODY_H