aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorproller <proller@github.com>2013-08-30 21:20:07 +0400
committerproller <proller@github.com>2013-09-17 02:43:24 +0400
commit62bc5331aad4e2c7cd64d57feb9cf27526842851 (patch)
tree72825458487df766e459f9227ccfc5634478ca7d /src
parent4c704fe30673eecad0903683fae627b7226c92d6 (diff)
downloadminetest-62bc5331aad4e2c7cd64d57feb9cf27526842851.tar.gz
minetest-62bc5331aad4e2c7cd64d57feb9cf27526842851.tar.bz2
minetest-62bc5331aad4e2c7cd64d57feb9cf27526842851.zip
Fog depend on humidity
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index f313ae28f..b9ffcb7cf 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;
}