about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/game/client/components/maplayers.cpp9
-rw-r--r--src/game/variables.hpp2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp
index 1d162999..b18685f9 100644
--- a/src/game/client/components/maplayers.cpp
+++ b/src/game/client/components/maplayers.cpp
@@ -63,7 +63,7 @@ void MAPLAYERS::on_render()
 	{
 		MAPITEM_GROUP *group = layers_get_group(g);
 		
-		if(group->version >= 2 && group->use_clipping)
+		if(!config.gfx_noclip && group->version >= 2 && group->use_clipping)
 		{
 			// set clipping
 			float points[4];
@@ -147,10 +147,11 @@ void MAPLAYERS::on_render()
 				//layershot_end();	
 			}
 		}
-		
-		gfx_clip_disable();
+		if(!config.gfx_noclip)
+			gfx_clip_disable();
 	}
 	
-	gfx_clip_disable();
+	if(!config.gfx_noclip)
+		gfx_clip_disable();
 }
 
diff --git a/src/game/variables.hpp b/src/game/variables.hpp
index 86472bc3..11fcc1e6 100644
--- a/src/game/variables.hpp
+++ b/src/game/variables.hpp
@@ -43,6 +43,8 @@ MACRO_CONFIG_INT(ui_color_sat, 70, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interfa
 MACRO_CONFIG_INT(ui_color_lht, 175, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color lightness")
 MACRO_CONFIG_INT(ui_color_alpha, 228, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface alpha")
 
+MACRO_CONFIG_INT(gfx_noclip, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Disable clipping")
+
 /* server */
 MACRO_CONFIG_INT(sv_warmup, 0, 0, 0, CFGFLAG_SERVER, "Number of seconds to do warpup before round starts")
 MACRO_CONFIG_STR(sv_motd, 900, "", CFGFLAG_SERVER, "Message of the day to display for the clients")