From b159d3c7f92e75a00c9da298f3a96dc65b4e424a Mon Sep 17 00:00:00 2001 From: jeefo Date: Sun, 26 Jul 2015 13:42:51 +0300 Subject: [PATCH] fixed bots looking at weird positions when spawned remove useless function calls --- include/core.h | 3 --- source/basecode.cpp | 8 +------- source/manager.cpp | 4 ++++ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/include/core.h b/include/core.h index c3eb6c7..889effb 100644 --- a/include/core.h +++ b/include/core.h @@ -1241,9 +1241,6 @@ public: inline Vector Center (void) { return (pev->absmax + pev->absmin) * 0.5; }; inline Vector EyePosition (void) { return pev->origin + pev->view_ofs; }; - // things that should be executed every frame - void ThinkFrame (void); - // the main function that decides intervals of running bot ai void ThinkMain (void); diff --git a/source/basecode.cpp b/source/basecode.cpp index 2517a46..07de227 100644 --- a/source/basecode.cpp +++ b/source/basecode.cpp @@ -2880,13 +2880,7 @@ void Bot::ThinkMain (void) m_thinkFps = GetWorldTime () + m_thinkInterval; } else - ThinkFrame (); -} - -void Bot::ThinkFrame (void) -{ - UpdateLookAngles (); - // RunPlayerMovement (); + UpdateLookAngles (); } void Bot::Think (void) diff --git a/source/manager.cpp b/source/manager.cpp index 22170d0..a020466 100644 --- a/source/manager.cpp +++ b/source/manager.cpp @@ -1119,6 +1119,10 @@ void Bot::NewRound (void) ChatterMessage (Chatter_NewRound); m_thinkInterval = (1.0f / 30.0f) * Random.Float (0.95f, 1.05f); + + // fixes bot looking at weird positions during buytime with think fps + m_aimFlags |= AIM_NAVPOINT; + ChooseAimDirection (); } void Bot::Kill (void)