]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix broken automatic waypoint generation for jumppads really close to other jumppads...
authorterencehill <piuntn@gmail.com>
Sat, 30 Dec 2017 18:55:45 +0000 (19:55 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 30 Dec 2017 18:55:45 +0000 (19:55 +0100)
qcsrc/server/bot/default/waypoints.qc

index c3b67a378fef08ac1a7823ceeb7064f049ef86a3..5fdd360a247a2edab05e8df031f1b64c4abba054 100644 (file)
@@ -184,14 +184,10 @@ void waypoint_setupmodel(entity wp)
 // (suitable for spawnfunc_waypoint editor)
 entity waypoint_spawn(vector m1, vector m2, float f)
 {
-       if(!(f & WAYPOINTFLAG_PERSONAL))
+       if(!(f & (WAYPOINTFLAG_PERSONAL | WAYPOINTFLAG_GENERATED)) && m1 == m2)
        {
-               vector em1 = m1, em2 = m2;
-               if (!(f & WAYPOINTFLAG_GENERATED) && m1 == m2)
-               {
-                       em1 = m1 - '8 8 8';
-                       em2 = m2 + '8 8 8';
-               }
+               vector em1 = m1 - '8 8 8';
+               vector em2 = m2 + '8 8 8';
                IL_EACH(g_waypoints, boxesoverlap(em1, em2, it.absmin, it.absmax),
                {
                        return it;