From 9e46cbf7ea512330f35d0f2ede0c7c0c085c7cf4 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 12 Oct 2011 13:53:38 +0300 Subject: Header file tweaking; mainly for speed --- src/client.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/client.cpp') 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 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 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 -- cgit v1.2.3