1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-13 11:43:06 +00:00

Prevent re-adding local scripts

This commit is contained in:
Evil Eye 2023-09-27 22:24:28 +02:00
parent f6626e36cf
commit 7594d94024

View file

@ -133,7 +133,7 @@ namespace MWLua
else else
{ {
newPtr = world->moveObject(ptr, destCell, pos); newPtr = world->moveObject(ptr, destCell, pos);
if (MWBase::Environment::get().getWorldScene()->isCellActive(*srcCell)) if (srcCell == destCell)
{ {
ESM::RefId script = cls.getScript(newPtr); ESM::RefId script = cls.getScript(newPtr);
if (!script.empty()) if (!script.empty())