From: mand1nga <mand1nga@xonotic.org>
Date: Mon, 29 Aug 2011 15:11:48 +0000 (-0300)
Subject: Don't invalidate the whole links cache if some waypoints can't be found
X-Git-Tag: xonotic-v0.5.0~26^2~3
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=664f01f8fe1b7042a422144eac69f8ad9c883c44;p=xonotic%2Fxonotic-data.pk3dir.git

Don't invalidate the whole links cache if some waypoints can't be found
---

diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc
index 076e96968..c48545e5a 100644
--- a/qcsrc/server/bot/waypoints.qc
+++ b/qcsrc/server/bot/waypoints.qc
@@ -411,10 +411,10 @@ float waypoint_load_links()
 
 			if(!found)
 			{
-				// can't find that waypoint
-				fclose(file);
-				return FALSE;
+				dprint("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin),"\n");
+				continue;
 			}
+
 		}
 
 		// Search "to" waypoint
@@ -433,9 +433,8 @@ float waypoint_load_links()
 
 		if(!found)
 		{
-			// can't find that waypoint
-			fclose(file);
-			return FALSE;
+			dprint("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin),"\n");
+			continue;
 		}
 
 		++c;