From 40e265fceb4e6bbbbf1333d0f5f4de33922a360b Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 29 Sep 2016 00:56:50 +1000 Subject: [PATCH] Minor performance improvement in bot movement code --- qcsrc/common/monsters/sv_monsters.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 02ad23817..ff1a5d397 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -869,10 +869,10 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed) } else { - entity e = find(NULL, targetname, this.target2); + entity e = this.goalentity; //find(NULL, targetname, this.target2); if(e.target2) this.target2 = e.target2; - else if(e.target) + else if(e.target) // compatibility this.target2 = e.target; movelib_brake_simple(this, stpspeed); -- 2.39.2