diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-02-06 17:26:48 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-02-06 17:27:54 +0200 |
commit | 94b25685c53e8a4494c71557b8db3e2570f5c287 (patch) | |
tree | 3de79a828a9484bde2aa415d0137a5d3a7de3b8a | |
parent | 88cdd3a363668cfb2fd07b5381cce29738aed0bf (diff) | |
download | minetest-94b25685c53e8a4494c71557b8db3e2570f5c287.tar.gz minetest-94b25685c53e8a4494c71557b8db3e2570f5c287.tar.bz2 minetest-94b25685c53e8a4494c71557b8db3e2570f5c287.zip |
Fix calculating if block is in viewing range; fix fog and default minimum accordingly
-rw-r--r-- | src/defaultsettings.cpp | 2 | ||||
-rw-r--r-- | src/game.cpp | 2 | ||||
-rw-r--r-- | src/utility.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 2b6cb7f53..78a1d0aa1 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -65,7 +65,7 @@ void set_default_settings(Settings *settings) settings->setDefault("wanted_fps", "30"); settings->setDefault("fps_max", "60"); settings->setDefault("viewing_range_nodes_max", "300"); - settings->setDefault("viewing_range_nodes_min", "15"); + settings->setDefault("viewing_range_nodes_min", "35"); settings->setDefault("screenW", "800"); settings->setDefault("screenH", "600"); settings->setDefault("address", ""); diff --git a/src/game.cpp b/src/game.cpp index a1f0fe07f..530291862 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2174,7 +2174,7 @@ void the_game( } else { - range = draw_control.wanted_range*BS + MAP_BLOCKSIZE*BS*1.5; + range = draw_control.wanted_range*BS + 0.0*MAP_BLOCKSIZE*BS; range *= 0.9; if(draw_control.range_all) range = 100000*BS; diff --git a/src/utility.cpp b/src/utility.cpp index 06b60884f..7c87b9ae4 100644 --- a/src/utility.cpp +++ b/src/utility.cpp @@ -208,7 +208,7 @@ bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir, return true; // If block is far away, it's not in sight - if(d > range * BS) + if(d > range) return false; // Maximum radius of a block |