}
void Brush_unlatchPreferences()
+{
+ Brush_toggleProjection(0);
+}
+
+void Brush_toggleProjection(int i)
{
if(g_showAlternativeTextureProjectionOption)
{
- g_useAlternativeTextureProjection.useLatched();
- globalErrorStream() << "Unlatched g_useAlternativeTextureProjection (" << g_useAlternativeTextureProjection.m_value << ")\n";
+ g_useAlternativeTextureProjection.m_value = g_useAlternativeTextureProjection.m_latched ^ i;
Brush::destroyStatic();
Brush::constructStatic(g_useAlternativeTextureProjection.m_value ? eBrushTypeQuake3BP : eBrushTypeQuake3);
}
}
-void Brush_toggleProjection()
+int Brush_toggleProjectionCount()
{
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);
- }
+ return 2;
+ return 1;
}
void Brush_Construct(EBrushType type)
void Brush_clipperColourChanged();
void Brush_unlatchPreferences();
-void Brush_toggleProjection();
+int Brush_toggleProjectionCount();
+void Brush_toggleProjection(int i);
#endif
if(format->wrongFormat)
{
// try toggling BrushPrimitives
- Map_Free();
- Brush_toggleProjection();
- g_map.m_name = filename;
- Map_UpdateTitle(g_map);
- g_map.m_resource = GlobalReferenceCache().capture(g_map.m_name.c_str());
- g_map.m_resource->attach(g_map);
+ for(i = 1; i < Brush_toggleProjectionCount(); ++i)
+ {
+ Map_Free();
+ Brush_toggleProjection(i);
+ g_map.m_name = filename;
+ Map_UpdateTitle(g_map);
+ g_map.m_resource = GlobalReferenceCache().capture(g_map.m_name.c_str());
+ g_map.m_resource->attach(g_map);
+ }
}
Node_getTraversable(GlobalSceneGraph().root())->traverse(entity_updateworldspawn());