]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/havocbot/havocbot.qc
Bot AI: when assigning a bot frame to find a new goal prioritize bots that have just...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / havocbot / havocbot.qc
index 98f8b790bd898ccf1f69fbeeed29fcdb6a604b50..7ca929859b67be15b4aa9718aa50bc93887f73cc 100644 (file)
@@ -752,9 +752,7 @@ void havocbot_movetogoal(entity this)
                                if(checkpvs(this.origin, this.goalentity))
                                {
                                        this.goalentity.bot_pickup_respawning = false;
-                                       navigation_clearroute(this);
-                                       navigation_goalrating_timeout_force(this);
-                                       return;
+                                       navigation_goalrating_timeout_expire(this, random());
                                }
                                locked_goal = true; // wait for item to respawn
                        }
@@ -765,9 +763,7 @@ void havocbot_movetogoal(entity this)
                {
                        if(checkpvs(this.origin, this.goalentity))
                        {
-                               navigation_clearroute(this);
-                               navigation_goalrating_timeout_force(this);
-                               return;
+                               navigation_goalrating_timeout_expire(this, random());
                        }
                }
        }
@@ -797,7 +793,7 @@ void havocbot_movetogoal(entity this)
        if(autocvar_bot_debug_goalstack)
                debuggoalstack(this);
 
-       bool bunnyhop_forbidden = false;;
+       bool bunnyhop_forbidden = false;
        SET_DESTCOORDS(this.goalcurrent, this.origin, destorg);
 
        // in case bot ends up inside the teleport waypoint without touching