From 430716bb98525931885e4ec8d042f2d349906691 Mon Sep 17 00:00:00 2001 From: HARLAN Date: Wed, 27 Nov 2013 11:52:05 -0500 Subject: [PATCH] #808 downgrade doors CharID --- SQF/dayz_code/actions/player_buildingDowngrade.sqf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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];