]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/waypoints.qc
Fix symmetrical editing of waypoints with custom origin (g_waypointeditor_symmetrical...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / waypoints.qc
index 32bfde96ed73c5ed69351c1871bf2405f4e4aa7c..f75829aecd8595d8a69087e9a035708d53cf14ef 100644 (file)
@@ -251,6 +251,8 @@ void waypoint_spawn_fromeditor(entity pl)
                   || (autocvar_g_waypointeditor_symmetrical < 0));
        if(autocvar_g_waypointeditor_symmetrical_order >= 2)
                ctf_flags = autocvar_g_waypointeditor_symmetrical_order;
+       if (sym && ctf_flags < 2)
+               ctf_flags = 2;
        int wp_num = ctf_flags;
 
        if(!PHYS_INPUT_BUTTON_CROUCH(pl))
@@ -293,7 +295,6 @@ void waypoint_spawn_fromeditor(entity pl)
 
 void waypoint_remove(entity wp)
 {
-       // tell all waypoints linked to wp that they need to relink
        IL_EACH(g_waypoints, it != wp,
        {
                if (waypoint_islinked(it, wp))
@@ -311,6 +312,8 @@ void waypoint_remove_fromeditor(entity pl)
                   || (autocvar_g_waypointeditor_symmetrical < 0));
        if(autocvar_g_waypointeditor_symmetrical_order >= 2)
                ctf_flags = autocvar_g_waypointeditor_symmetrical_order;
+       if (sym && ctf_flags < 2)
+               ctf_flags = 2;
        int wp_num = ctf_flags;
 
        LABEL(remove_wp);