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

Fix object position border checking

Borders have to be converted into BS format in order to be accurately comparable to
object positions.
This commit is contained in:
est31 2015-09-16 16:12:59 +02:00
parent f61f817b9c
commit 6c81be51ff
2 changed files with 11 additions and 9 deletions

View file

@ -1495,8 +1495,10 @@ u16 ServerEnvironment::addActiveObjectRaw(ServerActiveObject *object,
}
if (objectpos_over_limit(object->getBasePosition())) {
v3f p = object->getBasePosition();
errorstream << "ServerEnvironment::addActiveObjectRaw(): "
<< "object position outside maximum range" << std::endl;
<< "object position (" << p.X << "," << p.Y << "," << p.Z
<< ") outside maximum range" << std::endl;
if (object->environmentDeletes())
delete object;
return 0;