1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Objectpos over limit: Avoid crash caused by sector over limit

Reduce the object limit by mapblock size, to avoid objects being
added just inside the map generation limit but in a block and sector
that extend beyond the map generation limit.

Change notification of 'objectpos over limit' from red in-chat ERROR
to in-terminal only WARNING, since this will happen often using mob
mods near the world's edge.
This commit is contained in:
paramat 2017-02-13 04:37:25 +00:00
parent 2dcbc01904
commit 3955f51253
2 changed files with 13 additions and 9 deletions

View file

@ -1667,7 +1667,7 @@ u16 ServerEnvironment::addActiveObjectRaw(ServerActiveObject *object,
if (objectpos_over_limit(object->getBasePosition())) {
v3f p = object->getBasePosition();
errorstream << "ServerEnvironment::addActiveObjectRaw(): "
warningstream << "ServerEnvironment::addActiveObjectRaw(): "
<< "object position (" << p.X << "," << p.Y << "," << p.Z
<< ") outside maximum range" << std::endl;
if (object->environmentDeletes())