aboutsummaryrefslogtreecommitdiff
path: root/src/serverenvironment.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-01-21 10:41:00 +0100
committerGitHub <noreply@github.com>2017-01-21 10:41:00 +0100
commit2ea60156437962d7d29d20606bf5d9189059f76b (patch)
tree363ae730972807f1a35fe8b5222031385995118c /src/serverenvironment.cpp
parent0dada51a550c5eb52faf700dcbde4cee22a6bc70 (diff)
downloadminetest-2ea60156437962d7d29d20606bf5d9189059f76b.tar.gz
minetest-2ea60156437962d7d29d20606bf5d9189059f76b.tar.bz2
minetest-2ea60156437962d7d29d20606bf5d9189059f76b.zip
Do not force deletion of players when mapblock is full (#5081)
This fixes #4067
Diffstat (limited to 'src/serverenvironment.cpp')
-rw-r--r--src/serverenvironment.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index d3b85a430..41cd63684 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -2146,6 +2146,12 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
continue;
}
+ // If it's a forced delete, there are too many objects in mapblock
+ // Ignore players, they should not be removed on force delete
+ if (force_delete && obj->getType() == ACTIVEOBJECT_TYPE_PLAYER) {
+ continue;
+ }
+
verbosestream<<"ServerEnvironment::deactivateFarObjects(): "
<<"object id="<<id<<" is not known by clients"
<<"; deleting"<<std::endl;