mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Fix double call of addContainerScripts on player in moveObject (fixes #4490)
This commit is contained in:
parent
caad14093e
commit
14d3b213a1
@ -1166,7 +1166,10 @@ namespace MWWorld
|
||||
if (isPlayer)
|
||||
{
|
||||
if (!newCell->isExterior())
|
||||
{
|
||||
changeToInteriorCell(Misc::StringUtils::lowerCase(newCell->getCell()->mName), pos, false);
|
||||
removeContainerScripts(getPlayerPtr());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mWorldScene->isCellActive(*newCell))
|
||||
@ -1187,9 +1190,8 @@ namespace MWWorld
|
||||
mWorldScene->addObjectToScene(newPtr);
|
||||
|
||||
std::string script = newPtr.getClass().getScript(newPtr);
|
||||
if (!script.empty()) {
|
||||
if (!script.empty())
|
||||
mLocalScripts.add(script, newPtr);
|
||||
}
|
||||
addContainerScripts(newPtr, newCell);
|
||||
}
|
||||
else if (!newCellActive && currCellActive)
|
||||
|
Loading…
x
Reference in New Issue
Block a user