diff --git a/config/docs.cfg b/config/docs.cfg
index 1f9d4093..124abe36 100644
--- a/config/docs.cfg
+++ b/config/docs.cfg
@@ -938,7 +938,9 @@ docexample [old_editbinds = 0] [disables the old editing binds];
docexample [old_editbinds = 1] [enables the old editing binds];
docremark [If disabled, an updated editing binds system is used, see the comments in "/config/resetbinds.cfg" for more info.];
docident [slowmove] [Enables or disables the old editfly velocity.];
-docargument [N] [enable or disable] [min 0/max 1/default 0] [0];
+docargument [N] [0 off, 1 on] [min 0/max 1/default 0] [0];
+docident [oldselstyle] [Enables or disables using triangles to render the editing grid/current selection instead of squares.];
+docargument [N] [0 off, 1 on] [min 0/max 1/default 1] [0];
docsection [Menus]
docident [chmenumdl] [Changes the menu model of a specified menu.];
docargument [N] [the name of the menu] [] [0];
diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg
index a53dde89..6a9e30f3 100644
--- a/config/menus_settings.cfg
+++ b/config/menus_settings.cfg
@@ -403,6 +403,7 @@ menuitemslider "Console size: " 0 20 "$consize" 1 "" [ consize $arg1 ]
menuitemslider "Font type: " 0 2 "$__fontsetting" 1 [ "Default" "v104" "Mono" ] [ if (= $arg1 1) [ setfont v104; __fontsetting = 1 ] [ if (= $arg1 2) [ setfont mono; __fontsetting = 2 ] [ setfont default; __fontsetting = 0 ] ] ]
menuitemslider "Mini-map background style: " 0 2 "$showmapbackdrop" 1 [ "Fully Transparent" "Black" "White/Transparent" ] [ showmapbackdrop $arg1 ]
menuitemslider "Fly style: " 0 1 "$flystyle" 1 [ "fly fast, toggle slow" "fly slow, toggle fast" ] [ flystyle = $arg1; slowmove $arg1 ]
+menuitemslider "Grid/Selection style: " 0 1 "$oldselstyle" 1 [ "triangles" "squares (default)" ] [ oldselstyle $arg1 ]
menuitemcheckbox "Enable per-official map dynamic gamma: " "$dyngamma" [ dyngamma = $arg1 ]
menuitemtextinput "Set default gamma for this map: " "(at $ofc_gamma_list (findlist $defaultmaps (curmap 1)))" [ setgamma $arg1 ]
diff --git a/docs/reference.xml b/docs/reference.xml
index 88e581b0..292e5210 100644
--- a/docs/reference.xml
+++ b/docs/reference.xml
@@ -3705,9 +3705,14 @@ Output:
Enables or disables the old editfly velocity.
-
+
-
+
+
+ Enables or disables using triangles to render the editing grid/current selection instead of squares.
+
+
+
diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp
index c39dc9f8..f58da153 100644
--- a/source/src/rendergl.cpp
+++ b/source/src/rendergl.cpp
@@ -209,13 +209,15 @@ void linestyle(float width, int r, int g, int b)
glColor3ub(r,g,b);
}
+VARP(oldselstyle, 0, 1, 1); // Make the old (1004) grid/selection style default (render as quads rather than tris)
+
void box(block &b, float z1, float z2, float z3, float z4)
{
- glBegin(GL_TRIANGLE_STRIP);
+ glBegin((oldselstyle ? GL_QUADS : GL_TRIANGLE_STRIP));
glVertex3f((float)b.x, (float)b.y, z1);
glVertex3f((float)b.x+b.xs, (float)b.y, z2);
- glVertex3f((float)b.x, (float)b.y+b.ys, z4);
- glVertex3f((float)b.x+b.xs, (float)b.y+b.ys, z3);
+ glVertex3f((float)(oldselstyle ? b.x+b.xs : b.x), (float)b.y+b.ys, (oldselstyle ? z3 : z4));
+ glVertex3f((float)(oldselstyle ? b.x : b.x+b.xs), (float)b.y+b.ys, (oldselstyle ? z4 : z3));
glEnd();
xtraverts += 4;
}