]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Minor autowaypointer fixes.
authorRudolf Polzer <divverent@xonotic.org>
Fri, 9 Jan 2015 15:13:14 +0000 (07:13 -0800)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 9 Jan 2015 15:13:14 +0000 (07:13 -0800)
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/waypoints.qc

index 001617722ae1fc61eb781bb659061cad7e95edc1..0f4c330ed8882b2037a6e99bb5f7652d76a421bb 100644 (file)
@@ -430,7 +430,7 @@ entity navigation_findnearestwaypoint(entity ent, float walkfromwp)
        if (autocvar_g_waypointeditor_auto)
        {
                entity wp2 = navigation_findnearestwaypoint_withdist_except(ent, walkfromwp, 1050, wp);
-               if (!wp2)
+               if (wp && !wp2)
                        wp.wpflags |= WAYPOINTFLAG_PROTECTED;
        }
        return wp;
index da0b3508941ecaec1fdf0205e0b464be0c971978..4118b6b76998e6f3c082d3b3f4df7b8426517ab1 100644 (file)
@@ -1141,6 +1141,7 @@ void botframe_autowaypoints()
                //te_explosion(p.botframe_autowaypoints_lastwp0.origin);
        }
 
-       botframe_deleteuselesswaypoints();
+       // TODO(divVerent): For some reason this always removes newly created WPs. Need to figure out why.
+       //botframe_deleteuselesswaypoints();
 }