]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/brushmodule.cpp
somewhat unclean code, sorry... but it allows opening brushPrimitives maps in nonBrus...
[xonotic/netradiant.git] / radiant / brushmodule.cpp
index e8b605ca7d4a8da202ff4b350610644035951b12..d5853f07248b744c4894ddc1ec4a6b29d9e3786f 100644 (file)
@@ -101,6 +101,17 @@ void Brush_unlatchPreferences()
        }
 }
 
+void Brush_toggleProjection()
+{
+       if(g_showAlternativeTextureProjectionOption)
+       {
+               g_useAlternativeTextureProjection.m_value = !g_useAlternativeTextureProjection.m_value;
+               globalErrorStream() << "Toggled g_useAlternativeTextureProjection (" << g_useAlternativeTextureProjection.m_value << ")\n";
+               Brush::destroyStatic();
+               Brush::constructStatic(g_useAlternativeTextureProjection.m_value ? eBrushTypeQuake3BP : eBrushTypeQuake3);
+       }
+}
+
 void Brush_Construct(EBrushType type)
 {
   if(type == eBrushTypeQuake3)