diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf index f8af5e7c8..2a55adf8c 100644 --- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf +++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf @@ -120,6 +120,11 @@ if ((count _upgrade) > 0) then { // Get direction _dir = getDir _obj; + + // Reset the character ID on locked doors before they inherit the newclassname + if (_classname in DZE_DoorsLocked) then { + _object setVariable ["CharacterID",dayz_characterID,true]; + }; _classname = _newclassname; @@ -132,10 +137,6 @@ if ((count _upgrade) > 0) then { // Set location _object setPosATL _location; - // Reset the character ID (esp in the case of removing a lock) - if (_classname in DZE_DoorsLocked) then { - _object setVariable ["CharacterID",dayz_characterID,true]; - }; cutText [format[(localize "str_epoch_player_142"),_text], "PLAIN DOWN", 5];