mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Re-add abort timeout
Timeout is no longer restarted when you click abort and the loop now closes the gear menu so the player cannot attempt to dupe with the gear menu and abort menu open at the same time.
This commit is contained in:
@@ -47,12 +47,25 @@ while {(!isNull _display) && !r_player_dead} do {
|
||||
[localize "str_epoch_player_12",1] call dayz_rollingMessages;
|
||||
};
|
||||
default {
|
||||
waitUntil {_btnAbort ctrlSetText format["%1%2%3%4",_btnAbortText," (", str(10 - ((diag_tickTime - _testTime))), ")"]; uiSleep 0.1; ((diag_tickTime - _testTime) >= 10);};
|
||||
_gearDisplay = findDisplay 106;
|
||||
if (!isNull _gearDisplay) then {
|
||||
_gearDisplay closeDisplay 0;
|
||||
};
|
||||
if (!TimeOutDisplayed) then {
|
||||
waitUntil {_btnAbort ctrlSetText format["%1%2%3%4",_btnAbortText," (", str(ceil (((_testTime + 10) - diag_tickTime)*10)/10), ")"]; uiSleep 0.1; ((diag_tickTime - _testTime) >= 10);};
|
||||
if (!isNull _display) then {
|
||||
TimeOutDisplayed = true;
|
||||
};
|
||||
};
|
||||
_btnAbort ctrlEnable true;
|
||||
_btnAbort ctrlSetText _btnAbortText;
|
||||
};
|
||||
};
|
||||
if (!isNull _display) then { //this prevents the timeout from being skipped if the menu is quickly re-opened
|
||||
TimeOutDisplayed = false;
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
TimeOutDisplayed = false;
|
||||
if (r_player_dead) exitWith {_btnAbort ctrlEnable true;};
|
||||
Reference in New Issue
Block a user