aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-02-04 13:31:21 +0100
committersfan5 <sfan5@live.de>2017-02-04 13:31:21 +0100
commitde664b1c6d4b2bca47f918a6a865a920434bf664 (patch)
tree2150cb4153a756df1239159a34c281d34700a423
parent047168ca839677bd967d6186e22f5476e2264709 (diff)
downloadminetest-de664b1c6d4b2bca47f918a6a865a920434bf664.tar.gz
minetest-de664b1c6d4b2bca47f918a6a865a920434bf664.tar.bz2
minetest-de664b1c6d4b2bca47f918a6a865a920434bf664.zip
Fix PlayerSAO deletion warning (0eede97af2927dcda3545192403b0a44f30bcd1f)
-rw-r--r--src/serverenvironment.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index 7a5cfafd6..8d86a4e0a 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -2087,9 +2087,7 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
if(block)
{
- // Force delete object if mapblock is full, but ignore players
- if (obj->getType() != ACTIVEOBJECT_TYPE_PLAYER &&
- block->m_static_objects.m_stored.size() >= g_settings->getU16("max_objects_per_block")) {
+ if (block->m_static_objects.m_stored.size() >= g_settings->getU16("max_objects_per_block")) {
warningstream << "ServerEnv: Trying to store id = " << obj->getId()
<< " statically but block " << PP(blockpos)
<< " already contains "
@@ -2149,6 +2147,13 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
continue;
}
+ if (!force_delete && obj->getType() == ACTIVEOBJECT_TYPE_PLAYER) {
+ warningstream << "ServerEnvironment::deactivateFarObjects(): "
+ << "Trying to delete player object, THIS SHOULD NEVER HAPPEN!"
+ << std::endl;
+ continue;
+ }
+
verbosestream<<"ServerEnvironment::deactivateFarObjects(): "
<<"object id="<<id<<" is not known by clients"
<<"; deleting"<<std::endl;