Minor performance improvement in bot movement code
authorMario <mario@smbclan.net>
Wed, 28 Sep 2016 14:56:50 +0000 (00:56 +1000)
committerMario <mario@smbclan.net>
Wed, 28 Sep 2016 14:56:50 +0000 (00:56 +1000)
qcsrc/common/monsters/sv_monsters.qc

index 02ad238..ff1a5d3 100644 (file)
@@ -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);