1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 04:39:42 +00:00

Unbreak respawns and fix #7588

This commit is contained in:
Evil Eye 2023-09-27 22:07:55 +02:00
parent 33b57d9134
commit f6626e36cf
2 changed files with 7 additions and 1 deletions

View file

@ -133,6 +133,12 @@ namespace MWLua
else
{
newPtr = world->moveObject(ptr, destCell, pos);
if (MWBase::Environment::get().getWorldScene()->isCellActive(*srcCell))
{
ESM::RefId script = cls.getScript(newPtr);
if (!script.empty())
world->getLocalScripts().add(script, newPtr);
}
world->rotateObject(newPtr, rot, MWBase::RotationFlag_none);
}
if (placeOnGround)

View file

@ -1239,7 +1239,7 @@ namespace MWWorld
// no need to clearCorpse, handled as part of get<ESM::Creature>()
if (!ptr.getRefData().isDeleted())
ptr.getClass().respawn(ptr);
return false;
return true;
});
}
}