]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/brushmodule.cpp
properly ignore caulk
[xonotic/netradiant.git] / radiant / brushmodule.cpp
index 21cec0ee8b8ff385cc766cf8f47e452bc301c128..f493156ccb6f0c9c263cc32a040e613e76a51c99 100644 (file)
@@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "mainframe.h"
 #include "preferences.h"
 
-LatchedBool g_useAlternativeTextureProjection(false, "Use alternative texture-projection");
+LatchedBool g_useAlternativeTextureProjection(false, "Use alternative texture-projection (\"brush primitives\")");
 bool g_showAlternativeTextureProjectionOption = false;
 bool g_brush_always_caulk;
 
@@ -69,7 +69,7 @@ void Brush_constructPreferences(PreferencesPage& page)
   if(g_showAlternativeTextureProjectionOption)
   {
     page.appendCheckBox(
-      "", "Use alternative texture-projection",
+      "", "Use alternative texture-projection (\"brush primitives\")",
       LatchedBoolImportCaller(g_useAlternativeTextureProjection),
       BoolExportCaller(g_useAlternativeTextureProjection.m_latched)
     );
@@ -118,6 +118,10 @@ void Brush_Construct(EBrushType type)
   {
     g_showAlternativeTextureProjectionOption = true;
 
+    const char *value = g_pGameDescription->getKeyValue("brush_primit");
+    if(!string_empty(value))
+      g_useAlternativeTextureProjection.m_latched = atoi(value);
+
     GlobalPreferenceSystem().registerPreference(
       "AlternativeTextureProjection",
       BoolImportStringCaller(g_useAlternativeTextureProjection.m_latched),