mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
cancel building if ESC is pressed
This commit is contained in:
@@ -14,6 +14,8 @@ _reason = "";
|
|||||||
_canBuildOnPlot = false;
|
_canBuildOnPlot = false;
|
||||||
DZE_BuildingZ = 0;
|
DZE_BuildingZ = 0;
|
||||||
|
|
||||||
|
DZE_cancelBuilding = false;
|
||||||
|
|
||||||
DZE_5 = false;
|
DZE_5 = false;
|
||||||
|
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
@@ -216,7 +218,6 @@ if (_hasrequireditem) then {
|
|||||||
_reason = "Cancelled building.";
|
_reason = "Cancelled building.";
|
||||||
detach _object;
|
detach _object;
|
||||||
deleteVehicle _object;
|
deleteVehicle _object;
|
||||||
DZE_cancelBuilding = false;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -330,12 +330,13 @@ if (!isDedicated) then {
|
|||||||
DZE_5 = true;
|
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 {
|
if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (time - dayz_lastCheckBit > 10)) then {
|
||||||
dayz_lastCheckBit = time;
|
dayz_lastCheckBit = time;
|
||||||
call dayz_forceSave;
|
call dayz_forceSave;
|
||||||
DZE_cancelBuilding = true;
|
|
||||||
} else {
|
|
||||||
DZE_cancelBuilding = false;
|
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
if (_dikCode in actionKeys "IngamePause") then {
|
if (_dikCode in actionKeys "IngamePause") then {
|
||||||
|
|||||||
Reference in New Issue
Block a user