aboutsummaryrefslogtreecommitdiff
path: root/src/camera.cpp
diff options
context:
space:
mode:
authorlhofhansl <lhofhansl@yahoo.com>2016-11-30 00:13:14 -0800
committerZeno- <kde.psych@gmail.com>2016-11-30 18:13:14 +1000
commit5dc61988788e44bc87e8c57c0beded97d4efdf05 (patch)
treecc812fe691ba6ad62dbe65745d89c86cd974e817 /src/camera.cpp
parentc38985825f299999135cc01aaf0052ec9138135a (diff)
downloadminetest-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.cpp5
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);
}