diff options
Diffstat (limited to 'src/environment.cpp')
-rw-r--r-- | src/environment.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/environment.cpp b/src/environment.cpp index eb599668b..0b3c0347d 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -1493,6 +1493,15 @@ u16 ServerEnvironment::addActiveObjectRaw(ServerActiveObject *object, delete object; return 0; } + + if (objectpos_over_limit(object->getBasePosition())) { + errorstream << "ServerEnvironment::addActiveObjectRaw(): " + << "object position outside maximum range" << std::endl; + if (object->environmentDeletes()) + delete object; + return 0; + } + /*infostream<<"ServerEnvironment::addActiveObjectRaw(): " <<"added (id="<<object->getId()<<")"<<std::endl;*/ |