mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-01 13:20:29 +00:00
Unbreak respawns and fix #7588
This commit is contained in:
parent
33b57d9134
commit
f6626e36cf
@ -133,6 +133,12 @@ namespace MWLua
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newPtr = world->moveObject(ptr, destCell, pos);
|
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);
|
world->rotateObject(newPtr, rot, MWBase::RotationFlag_none);
|
||||||
}
|
}
|
||||||
if (placeOnGround)
|
if (placeOnGround)
|
||||||
|
@ -1239,7 +1239,7 @@ namespace MWWorld
|
|||||||
// no need to clearCorpse, handled as part of get<ESM::Creature>()
|
// no need to clearCorpse, handled as part of get<ESM::Creature>()
|
||||||
if (!ptr.getRefData().isDeleted())
|
if (!ptr.getRefData().isDeleted())
|
||||||
ptr.getClass().respawn(ptr);
|
ptr.getClass().respawn(ptr);
|
||||||
return false;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user