diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-10-18 21:08:31 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-10-18 21:08:31 +0300 |
commit | 9b907dd65a2c045d10605894fdaea504200e2be7 (patch) | |
tree | 411bffac25c47471bdd05eabcbf7c210ec3a231d /src/game.cpp | |
parent | 28f2fdb6dec0c54ce9e32df79a73ef19aee03fd5 (diff) | |
download | minetest-9b907dd65a2c045d10605894fdaea504200e2be7.tar.gz minetest-9b907dd65a2c045d10605894fdaea504200e2be7.tar.bz2 minetest-9b907dd65a2c045d10605894fdaea504200e2be7.zip |
Try to tune fog to work well on high-end machines also
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
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( |