mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-09 21:44:54 +00:00
Merge branch 'youonlyneedtounlockonce' into 'master'
Don't unlock unlocked objects now that unlock is no longer idempotent See merge request OpenMW/openmw!3125
This commit is contained in:
commit
1d5b73f20a
@ -954,9 +954,9 @@ namespace MWMechanics
|
|||||||
|
|
||||||
if (caster == getPlayer())
|
if (caster == getPlayer())
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicOpenSuccess}");
|
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicOpenSuccess}");
|
||||||
}
|
|
||||||
target.getCellRef().unlock();
|
target.getCellRef().unlock();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->playSound3D(
|
MWBase::Environment::get().getSoundManager()->playSound3D(
|
||||||
|
@ -366,7 +366,7 @@ namespace MWScript
|
|||||||
void execute(Interpreter::Runtime& runtime) override
|
void execute(Interpreter::Runtime& runtime) override
|
||||||
{
|
{
|
||||||
MWWorld::Ptr ptr = R()(runtime);
|
MWWorld::Ptr ptr = R()(runtime);
|
||||||
|
if (ptr.getCellRef().isLocked())
|
||||||
ptr.getCellRef().unlock();
|
ptr.getCellRef().unlock();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user