diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index cdb0b389f..a090ebe53 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -14,6 +14,8 @@ _reason = ""; _canBuildOnPlot = false; DZE_BuildingZ = 0; +DZE_cancelBuilding = false; + DZE_5 = false; call gear_ui_init; @@ -216,7 +218,6 @@ if (_hasrequireditem) then { _reason = "Cancelled building."; detach _object; deleteVehicle _object; - DZE_cancelBuilding = false; }; }; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 6b74ce4be..c793fc1f4 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -329,13 +329,14 @@ if (!isDedicated) then { if (_dikCode == 0x4C) then { DZE_5 = true; }; + + if (_dikCode == 0x01) then { + DZE_cancelBuilding = true; + }; if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (time - dayz_lastCheckBit > 10)) then { dayz_lastCheckBit = time; call dayz_forceSave; - DZE_cancelBuilding = true; - } else { - DZE_cancelBuilding = false; }; /* if (_dikCode in actionKeys "IngamePause") then {