summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-12-07 00:37:37 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-12-07 00:51:01 +1000
commit2b119e1e192ead701e69e261fe94ccb7382dbee7 (patch)
tree19613c0e9baae43b281861ceaa1ecc08b907dba6 /src/client.cpp
parent2fd14e1bd53918b3c4fcdfbc81294ff8b7afe1fa (diff)
downloadminetest-2b119e1e192ead701e69e261fe94ccb7382dbee7.tar.gz
minetest-2b119e1e192ead701e69e261fe94ccb7382dbee7.tar.bz2
minetest-2b119e1e192ead701e69e261fe94ccb7382dbee7.zip
Performance of main client loop up to 2x faster In places, up to 3 times faster
NOTE 1: This does not mean a 2x increase in framerate. Increase in fps may be up to 1-2fps NOTE 2: This local 'caching' of settings is not optimal and an alternative solution will be worked on after 0.4.11 is released
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp
index c7fea6a11..b05787b36 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -309,6 +309,8 @@ Client::Client(
} else {
localdb = NULL;
}
+
+ m_cache_smooth_lighting = g_settings->getBool("smooth_lighting");
}
void Client::Stop()
@@ -2609,7 +2611,7 @@ void Client::addUpdateMeshTask(v3s16 p, bool ack_to_server, bool urgent)
data->fill(b);
data->setCrack(m_crack_level, m_crack_pos);
data->setHighlighted(m_highlighted_pos, m_show_highlighted);
- data->setSmoothLighting(g_settings->getBool("smooth_lighting"));
+ data->setSmoothLighting(m_cache_smooth_lighting);
}
// Add task to queue