diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-10-12 13:53:38 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-10-12 13:53:38 +0300 |
commit | 9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4 (patch) | |
tree | f937a97b67b5ecd0ee65ed9a845e6e4a640bb629 /src/client.cpp | |
parent | b60b58b627f078faba002401d300b522e0077efc (diff) | |
download | minetest-9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4.tar.gz minetest-9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4.tar.bz2 minetest-9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4.zip |
Header file tweaking; mainly for speed
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/client.cpp b/src/client.cpp index fa600719e..ee66e648e 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -28,6 +28,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mapsector.h" #include "mapblock_mesh.h" #include "mapblock.h" +#include "settings.h" +#include "profiler.h" /* QueuedMeshUpdate @@ -151,7 +153,7 @@ void * MeshUpdateThread::Thread() continue; } - ScopeProfiler sp(&g_profiler, "mesh make"); + ScopeProfiler sp(g_profiler, "mesh make"); scene::SMesh *mesh_new = NULL; mesh_new = makeMapBlockMesh(q->data); @@ -327,7 +329,7 @@ void Client::step(float dtime) core::list<v3s16> deleted_blocks; float delete_unused_sectors_timeout = - g_settings.getFloat("client_delete_unused_sectors_timeout"); + g_settings->getFloat("client_delete_unused_sectors_timeout"); // Delete sector blocks /*u32 num = m_env.getMap().unloadUnusedData @@ -449,10 +451,10 @@ void Client::step(float dtime) const float map_timer_and_unload_dtime = 5.25; if(m_map_timer_and_unload_interval.step(dtime, map_timer_and_unload_dtime)) { - ScopeProfiler sp(&g_profiler, "Client: map timer and unload"); + ScopeProfiler sp(g_profiler, "Client: map timer and unload"); core::list<v3s16> deleted_blocks; m_env.getMap().timerUpdate(map_timer_and_unload_dtime, - g_settings.getFloat("client_unload_unused_data_timeout"), + g_settings->getFloat("client_unload_unused_data_timeout"), &deleted_blocks); /*if(deleted_blocks.size() > 0) @@ -1403,7 +1405,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) } else if(command == TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD) { - //if(g_settings.getBool("enable_experimental")) + //if(g_settings->getBool("enable_experimental")) { /* u16 command @@ -1462,7 +1464,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) } else if(command == TOCLIENT_ACTIVE_OBJECT_MESSAGES) { - //if(g_settings.getBool("enable_experimental")) + //if(g_settings->getBool("enable_experimental")) { /* u16 command |