diff options
author | lhofhansl <lhofhansl@yahoo.com> | 2016-11-30 00:13:14 -0800 |
---|---|---|
committer | Zeno- <kde.psych@gmail.com> | 2016-11-30 18:13:14 +1000 |
commit | 5dc61988788e44bc87e8c57c0beded97d4efdf05 (patch) | |
tree | cc812fe691ba6ad62dbe65745d89c86cd974e817 /src/camera.cpp | |
parent | c38985825f299999135cc01aaf0052ec9138135a (diff) | |
download | minetest-5dc61988788e44bc87e8c57c0beded97d4efdf05.tar.gz minetest-5dc61988788e44bc87e8c57c0beded97d4efdf05.tar.bz2 minetest-5dc61988788e44bc87e8c57c0beded97d4efdf05.zip |
Optimize/adjust blocks/ActiveObjects sent at the server based on client settings. (#4811)
Optimize/adjust blocks and active blocks sent at the server based on client settings.
Diffstat (limited to 'src/camera.cpp')
-rw-r--r-- | src/camera.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/camera.cpp b/src/camera.cpp index b86f218fe..43980db1c 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -484,13 +484,12 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, void Camera::updateViewingRange() { + f32 viewing_range = g_settings->getFloat("viewing_range"); + m_draw_control.wanted_range = viewing_range; if (m_draw_control.range_all) { m_cameranode->setFarValue(100000.0); return; } - - f32 viewing_range = g_settings->getFloat("viewing_range"); - m_draw_control.wanted_range = viewing_range; m_cameranode->setFarValue((viewing_range < 2000) ? 2000 * BS : viewing_range * BS); } |