Merge branch 'youonlyneedtounlockonce' into 'master'

Don't unlock unlocked objects now that unlock is no longer idempotent

See merge request OpenMW/openmw!3125
revert-6246b479
psi29a 2 years ago
commit 1d5b73f20a

@ -954,8 +954,8 @@ namespace MWMechanics
if (caster == getPlayer())
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicOpenSuccess}");
target.getCellRef().unlock();
}
target.getCellRef().unlock();
}
else
{

@ -366,8 +366,8 @@ namespace MWScript
void execute(Interpreter::Runtime& runtime) override
{
MWWorld::Ptr ptr = R()(runtime);
ptr.getCellRef().unlock();
if (ptr.getCellRef().isLocked())
ptr.getCellRef().unlock();
}
};

Loading…
Cancel
Save