From 9b907dd65a2c045d10605894fdaea504200e2be7 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 18 Oct 2011 21:08:31 +0300 Subject: Try to tune fog to work well on high-end machines also --- src/game.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index e3380ace4..c67660ec8 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -952,6 +952,8 @@ void the_game( bool show_profiler = false; + bool force_fog_off = false; + /* Main loop */ @@ -1323,6 +1325,10 @@ void the_game( show_profiler = !show_profiler; guitext_profiler->setVisible(show_profiler); } + else if(input->wasKeyDown(getKeySetting("keymap_toggle_force_fog_off"))) + { + force_fog_off = !force_fog_off; + } // Item selection with mouse wheel { @@ -1971,7 +1977,7 @@ void the_game( Fog */ - if(g_settings->getBool("enable_fog") == true) + if(g_settings->getBool("enable_fog") == true && !force_fog_off) { f32 range; if(farmesh) @@ -1981,12 +1987,11 @@ void the_game( else { range = draw_control.wanted_range*BS + MAP_BLOCKSIZE*BS*1.5; + range *= 0.9; if(draw_control.range_all) range = 100000*BS; /*if(range < 50*BS) range = range * 0.5 + 25*BS;*/ - // Move the invisible limit a bit further - //range *= 1.2; } driver->setFog( -- cgit v1.2.3