Skip to content

Commit

Permalink
Do not force deletion of players when mapblock is full (#5081)
Browse files Browse the repository at this point in the history
This fixes #4067
  • Loading branch information
nerzhul committed Jan 21, 2017
1 parent 0dada51 commit 2ea6015
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/serverenvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2ea6015

Please sign in to comment.