]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove an item about to spawn as goal if somebody else picked it up before bot reaches it
authorterencehill <piuntn@gmail.com>
Tue, 14 Feb 2017 14:48:58 +0000 (15:48 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 14 Feb 2017 14:48:58 +0000 (15:48 +0100)
qcsrc/server/bot/default/navigation.qc

index bfc72d60f5fd5d8432abaed7d66d1295d8d88694..5d612e10f0641b0384f4e8ae6a6f08ab66a05096 100644 (file)
@@ -946,7 +946,10 @@ void navigation_poptouchedgoals(entity this)
        if(this.goalcurrent.bot_pickup_respawning)
        {
                if(!this.goalcurrent.solid)
-                       return;
+               {
+                       if(time > this.goalcurrent.scheduledrespawntime - 10) // item not yet taken (by someone else)
+                               return; // wait for item to respawn
+               }
                this.goalcurrent.bot_pickup_respawning = false;
        }