File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -2086,7 +2086,9 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
2086
2086
2087
2087
if (block)
2088
2088
{
2089
- if (block->m_static_objects .m_stored .size () >= g_settings->getU16 (" max_objects_per_block" )) {
2089
+ // Force delete object if mapblock is full, but ignore players
2090
+ if (obj->getType () != ACTIVEOBJECT_TYPE_PLAYER &&
2091
+ block->m_static_objects .m_stored .size () >= g_settings->getU16 (" max_objects_per_block" )) {
2090
2092
warningstream << " ServerEnv: Trying to store id = " << obj->getId ()
2091
2093
<< " statically but block " << PP (blockpos)
2092
2094
<< " already contains "
@@ -2146,12 +2148,6 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
2146
2148
continue ;
2147
2149
}
2148
2150
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
-
2155
2151
verbosestream<<" ServerEnvironment::deactivateFarObjects(): "
2156
2152
<<" object id=" <<id<<" is not known by clients"
2157
2153
<<" ; deleting" <<std::endl;
You can’t perform that action at this time.
0 commit comments