1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Improve readability and infos in verbose log (#13828)

This commit is contained in:
sfan5 2023-09-22 18:41:10 +02:00 committed by GitHub
parent 5949172735
commit c3114132d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 26 additions and 51 deletions

View file

@ -91,14 +91,15 @@ bool MapBlock::onObjectsActivation()
if (m_static_objects.getAllStored().empty())
return false;
const auto count = m_static_objects.getStoredSize();
verbosestream << "MapBlock::onObjectsActivation(): "
<< "activating objects of block " << getPos() << " ("
<< m_static_objects.getStoredSize() << " objects)" << std::endl;
<< "activating " << count << "objects in block " << getPos()
<< std::endl;
if (m_static_objects.getStoredSize() > g_settings->getU16("max_objects_per_block")) {
if (count > g_settings->getU16("max_objects_per_block")) {
errorstream << "suspiciously large amount of objects detected: "
<< m_static_objects.getStoredSize() << " in "
<< getPos() << "; removing all of them." << std::endl;
<< count << " in " << getPos() << "; removing all of them."
<< std::endl;
// Clear stored list
m_static_objects.clearStored();
raiseModified(MOD_STATE_WRITE_NEEDED, MOD_REASON_TOO_MANY_OBJECTS);