Skip to content

Commit 2ea6015

Browse files
authoredJan 21, 2017
Do not force deletion of players when mapblock is full (#5081)
This fixes #4067
1 parent 0dada51 commit 2ea6015

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/serverenvironment.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,12 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
21462146
continue;
21472147
}
21482148

2149+
// If it's a forced delete, there are too many objects in mapblock
2150+
// Ignore players, they should not be removed on force delete
2151+
if (force_delete && obj->getType() == ACTIVEOBJECT_TYPE_PLAYER) {
2152+
continue;
2153+
}
2154+
21492155
verbosestream<<"ServerEnvironment::deactivateFarObjects(): "
21502156
<<"object id="<<id<<" is not known by clients"
21512157
<<"; deleting"<<std::endl;

0 commit comments

Comments
 (0)
Please sign in to comment.