OpenMW/openmw — pull request #56 by Digmaster (2014-04-23 09:24:37+00:00)
Title: LockLevels are stored even when door is unlocked

The data is stored in the esm as -(lockLevel) if unlocked; lockLevel if locked (as there's no way to save it separately). While compatibility is not tested, it should be backwards compatible (Previously any negative value was seen as unlocked).

This is to ultimately to fix this bug: https://bugs.openmw.org/issues/1098, which requires knowledge of prior locklevels. I have not implemented the fix to this problem yet, but after this it should be very trivial (I just need to find the correct file as always)

The only issue is that it may damage any script which relies on the previous behavior of "lock" always setting the lock level to 100, obviously it's an easy fix if any scripts do rely on this (It only occurs when the door previously had a lock level and then get unlocked)