Do not force deletion of players when mapblock is full (#5081)

This fixes #4067
master
Loïc Blot 2017-01-21 10:41:00 +01:00 committed by GitHub
parent 0dada51a55
commit 2ea6015643
1 changed files with 6 additions and 0 deletions

View File

@ -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;