From: terencehill Date: Mon, 13 Feb 2017 17:15:21 +0000 (+0100) Subject: Fix g_waypointeditor_saveall saving each waypoint 32 times... X-Git-Tag: xonotic-v0.8.2~211 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2f9218ac3d95f1bcca81a6421bcf21facf1759f9;p=xonotic%2Fxonotic-data.pk3dir.git Fix g_waypointeditor_saveall saving each waypoint 32 times... --- diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index 1e03bf5e1..bd920149b 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -624,17 +624,14 @@ void waypoint_saveall() if(it.wpflags & WAYPOINTFLAG_GENERATED) continue; - for(int j = 0; j < 32; ++j) - { - string s; - s = strcat(vtos(it.origin + it.mins), "\n"); - s = strcat(s, vtos(it.origin + it.maxs)); - s = strcat(s, "\n"); - s = strcat(s, ftos(it.wpflags)); - s = strcat(s, "\n"); - fputs(file, s); - ++c; - } + string s; + s = strcat(vtos(it.origin + it.mins), "\n"); + s = strcat(s, vtos(it.origin + it.maxs)); + s = strcat(s, "\n"); + s = strcat(s, ftos(it.wpflags)); + s = strcat(s, "\n"); + fputs(file, s); + c++; }); fclose(file); waypoint_save_links();