]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot waypoints: fix removal of the 32th link of a waypoint
authorterencehill <piuntn@gmail.com>
Sat, 13 Oct 2018 14:02:10 +0000 (16:02 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 13 Oct 2018 14:02:10 +0000 (16:02 +0200)
qcsrc/server/bot/default/waypoints.qc

index 6991ff00f556225079dfa27ced38714963a231bb..a8d9534503d774ac59f2391e6444d7c96e53df3b 100644 (file)
@@ -390,7 +390,7 @@ void waypoint_removelink(entity from, entity to)
        if (!found && from.wp28 == to) found = true; if (found) {from.wp28 = from.wp29; from.wp28mincost = from.wp29mincost;}
        if (!found && from.wp29 == to) found = true; if (found) {from.wp29 = from.wp30; from.wp29mincost = from.wp30mincost;}
        if (!found && from.wp30 == to) found = true; if (found) {from.wp30 = from.wp31; from.wp30mincost = from.wp31mincost;}
-       if (found) {from.wp31 = NULL; from.wp31mincost = 10000000;}
+       if (!found && from.wp31 == to) found = true; if (found) {from.wp31 = NULL; from.wp31mincost = 10000000;}
 }
 
 bool waypoint_islinked(entity from, entity to)