From 9a62a909bc9dd3ed7513b07d3d451769757b69f0 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 17 Oct 2011 19:44:28 +0300 Subject: Add a log message to SEnv and make it load objects if there are < 51 of them, to load blocks that were limited to 50 --- src/environment.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/environment.cpp b/src/environment.cpp index 25e65d2be..16bdcf979 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -888,6 +888,16 @@ void ServerEnvironment::step(float dtime) continue; active_object_count_wider += block->m_static_objects.m_active.size(); + + if(block->m_static_objects.m_stored.size() != 0){ + errorstream<<"ServerEnvironment::step(): " + <getPos())<<" contains " + <m_static_objects.m_stored.size() + <<" stored objects; " + <<"when spawning objects, when counting active " + <<"objects in wide area. relative position: " + <<"("<getPos()) <<" ("<m_static_objects.m_stored.size() <<" objects)"<m_static_objects.m_stored.size() >= 50); + bool large_amount = (block->m_static_objects.m_stored.size() >= 51); if(large_amount){ errorstream<<"suspiciously large amount of objects detected: " <m_static_objects.m_stored.size()<<" in " -- cgit v1.2.3