From: Mario Date: Wed, 28 Sep 2016 14:56:50 +0000 (+1000) Subject: Minor performance improvement in bot movement code X-Git-Tag: xonotic-v0.8.2~563 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=40e265fceb4e6bbbbf1333d0f5f4de33922a360b;p=xonotic%2Fxonotic-data.pk3dir.git Minor performance improvement in bot movement code --- 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);