]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Waypoints, change keyword: VERSION -> WAYPOINT_VERSION
authorterencehill <piuntn@gmail.com>
Tue, 29 Aug 2017 18:10:45 +0000 (20:10 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 30 Aug 2017 10:38:01 +0000 (12:38 +0200)
qcsrc/server/bot/default/waypoints.qc

index f4c56027ed5eec73843baabc6922991147249f1a..4b7da649cfd694d52f26c7f598101f26211f43ff 100644 (file)
@@ -710,8 +710,8 @@ bool waypoint_load_links()
                {
                        if(substring(s, 0, 2) == "//")
                        {
-                               if(substring(s, 2, 8) == "VERSION ")
-                                       ver = stof(substring(s, 10, -1));
+                               if(substring(s, 2, 17) == "WAYPOINT_VERSION ")
+                                       ver = stof(substring(s, 19, -1));
                                continue;
                        }
                        else
@@ -944,7 +944,7 @@ void waypoint_save_links()
                return;
        }
 
-       fputs(file, strcat("//", "VERSION ", ftos_decimals(WAYPOINT_VERSION, 2), "\n"));
+       fputs(file, strcat("//", "WAYPOINT_VERSION ", ftos_decimals(WAYPOINT_VERSION, 2), "\n"));
 
        int c = 0;
        IL_EACH(g_waypoints, true,
@@ -984,7 +984,7 @@ void waypoint_saveall()
 
        // add 3 comments to not break compatibility with older Xonotic versions
        // (they are read as a waypoint with origin '0 0 0' and flag 0 though)
-       fputs(file, strcat("//", "VERSION ", ftos_decimals(WAYPOINT_VERSION, 2), "\n"));
+       fputs(file, strcat("//", "WAYPOINT_VERSION ", ftos_decimals(WAYPOINT_VERSION, 2), "\n"));
        fputs(file, strcat("//", "\n"));
        fputs(file, strcat("//", "\n"));
 
@@ -1037,8 +1037,8 @@ float waypoint_loadall()
                {
                        if(substring(s, 0, 2) == "//")
                        {
-                               if(substring(s, 2, 8) == "VERSION ")
-                                       ver = stof(substring(s, 10, -1));
+                               if(substring(s, 2, 17) == "WAYPOINT_VERSION ")
+                                       ver = stof(substring(s, 19, -1));
                                continue;
                        }
                        else