summaryrefslogtreecommitdiff
path: root/game/server/NextBot/NextBotBodyInterface.cpp
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/NextBot/NextBotBodyInterface.cpp
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'game/server/NextBot/NextBotBodyInterface.cpp')
-rw-r--r--game/server/NextBot/NextBotBodyInterface.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/game/server/NextBot/NextBotBodyInterface.cpp b/game/server/NextBot/NextBotBodyInterface.cpp
new file mode 100644
index 0000000..143ed4c
--- /dev/null
+++ b/game/server/NextBot/NextBotBodyInterface.cpp
@@ -0,0 +1,55 @@
+// NextBotBodyInterface.cpp
+// Control and information about the bot's body state (posture, animation state, etc)
+// Author: Michael Booth, April 2006
+//========= Copyright Valve Corporation, All rights reserved. ============//
+
+#include "cbase.h"
+
+#include "NextBot.h"
+#include "NextBotBodyInterface.h"
+
+
+void IBody::AimHeadTowards( const Vector &lookAtPos, LookAtPriorityType priority, float duration, INextBotReply *replyWhenAimed, const char *reason )
+{
+ if ( replyWhenAimed )
+ {
+ replyWhenAimed->OnFail( GetBot(), INextBotReply::FAILED );
+ }
+}
+
+void IBody::AimHeadTowards( CBaseEntity *subject, LookAtPriorityType priority, float duration, INextBotReply *replyWhenAimed, const char *reason )
+{
+ if ( replyWhenAimed )
+ {
+ replyWhenAimed->OnFail( GetBot(), INextBotReply::FAILED );
+ }
+}
+
+bool IBody::SetPosition( const Vector &pos )
+{
+ GetBot()->GetEntity()->SetAbsOrigin( pos );
+ return true;
+}
+
+const Vector &IBody::GetEyePosition( void ) const
+{
+ static Vector eye;
+
+ eye = GetBot()->GetEntity()->WorldSpaceCenter();
+
+ return eye;
+}
+
+const Vector &IBody::GetViewVector( void ) const
+{
+ static Vector view;
+
+ AngleVectors( GetBot()->GetEntity()->EyeAngles(), &view );
+
+ return view;
+}
+
+bool IBody::IsHeadAimingOnTarget( void ) const
+{
+ return false;
+}