From 62bc5331aad4e2c7cd64d57feb9cf27526842851 Mon Sep 17 00:00:00 2001 From: proller Date: Fri, 30 Aug 2013 21:20:07 +0400 Subject: [PATCH] Fog depend on humidity --- src/game.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game.cpp b/src/game.cpp index f313ae28..b9ffcb7c 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2860,6 +2860,8 @@ void the_game( fog_range = 100000*BS; else { fog_range = draw_control.wanted_range*BS + 0.0*MAP_BLOCKSIZE*BS; + if(g_settings->getBool("weather")) + fog_range *= (1.5 - 1.4*(float)client.getEnv().getClientMap().getHumidity(pos_i)/100); fog_range = MYMIN(fog_range, (draw_control.farthest_drawn+20)*BS); fog_range *= 0.9; }