From: Rudolf Polzer Date: Fri, 9 Jan 2015 15:13:14 +0000 (-0800) Subject: Minor autowaypointer fixes. X-Git-Tag: xonotic-v0.8.0~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=54ec41b3a35691589815cd9a2e259473494745c3;p=xonotic%2Fxonotic-data.pk3dir.git Minor autowaypointer fixes. --- diff --git a/qcsrc/server/bot/navigation.qc b/qcsrc/server/bot/navigation.qc index 001617722..0f4c330ed 100644 --- a/qcsrc/server/bot/navigation.qc +++ b/qcsrc/server/bot/navigation.qc @@ -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; diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index da0b35089..4118b6b76 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -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(); }