1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Try to tune fog to work well on high-end machines also

This commit is contained in:
Perttu Ahola 2011-10-18 21:08:31 +03:00
parent 28f2fdb6de
commit 9b907dd65a
4 changed files with 17 additions and 11 deletions

View file

@ -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(