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:
parent
33b57d9134
commit
f6626e36cf
2 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue