]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 02ad23817c67642f8026b737f466d94d168c4e47..ff1a5d397ee1bdf3a9311ec82cc3ebc63adf9b39 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);