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:
icomrade
2016-09-23 19:10:39 -04:00
parent 770378b3af
commit 40d419e475
2 changed files with 15 additions and 1 deletions

View File

@@ -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;};