diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-06-18 12:42:17 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-06-18 12:42:17 +0300 |
commit | 7773e68c2a42659b4a34af56e1fc799ffc9362ed (patch) | |
tree | fad8c7854ec23e17e0a7d27bae35101a2a4ec5f2 /src/game.cpp | |
parent | 0bd1b782d0134180ae1af692533f1c59e29a03de (diff) | |
download | minetest-7773e68c2a42659b4a34af56e1fc799ffc9362ed.tar.gz minetest-7773e68c2a42659b4a34af56e1fc799ffc9362ed.tar.bz2 minetest-7773e68c2a42659b4a34af56e1fc799ffc9362ed.zip |
farmesh is now usable.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/game.cpp b/src/game.cpp index 7ad7746ad..237867be1 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -599,9 +599,9 @@ void update_skybox(video::IVideoDriver* driver, skybox->remove(); } - // Disable skybox if FarMesh is enabled + /*// Disable skybox if FarMesh is enabled if(g_settings.getBool("enable_farmesh")) - return; + return;*/ if(brightness >= 0.5) { @@ -836,7 +836,7 @@ void the_game( FarMesh *farmesh = NULL; if(g_settings.getBool("enable_farmesh")) { - farmesh = new FarMesh(smgr->getRootSceneNode(), smgr, -1, client.getMapSeed()); + farmesh = new FarMesh(smgr->getRootSceneNode(), smgr, -1, client.getMapSeed(), &client); } /* @@ -1844,11 +1844,19 @@ void the_game( if(g_settings.getBool("enable_fog") == true) { - f32 range = draw_control.wanted_range*BS + MAP_BLOCKSIZE*BS*1.5; - if(draw_control.range_all) - range = 100000*BS; - if(range < 50*BS) - range = range * 0.5 + 25*BS; + f32 range; + if(farmesh) + { + range = BS*MAP_BLOCKSIZE*20; + } + else + { + range = draw_control.wanted_range*BS + MAP_BLOCKSIZE*BS*1.5; + if(draw_control.range_all) + range = 100000*BS; + if(range < 50*BS) + range = range * 0.5 + 25*BS; + } driver->setFog( bgcolor, |