added 10ths of seconds to abort timer

This commit is contained in:
[VB]AWOL
2013-12-10 15:45:10 -06:00
parent 9299ffe7b6
commit e59ceab3ef

View File

@@ -21,32 +21,40 @@ private ["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_btnAbortTe
call dayz_forceSave; call dayz_forceSave;
}; };
_sleep = 1;
while {!isNull _display} do { while {!isNull _display} do {
switch true do { switch true do {
case (!r_player_dead and {isPlayer _x} count (player nearEntities ["AllVehicles", 12]) > 1) : { case (!r_player_dead and {isPlayer _x} count (player nearEntities ["AllVehicles", 12]) > 1) : {
_btnAbort ctrlEnable false; _btnAbort ctrlEnable false;
cutText [localize "str_abort_playerclose", "PLAIN DOWN"]; cutText [localize "str_abort_playerclose", "PLAIN DOWN"];
_sleep = 1;
}; };
case (!r_player_dead and !canbuild) : { case (!r_player_dead and !canbuild) : {
_btnAbort ctrlEnable false; _btnAbort ctrlEnable false;
cutText [(localize "str_epoch_player_12"), "PLAIN DOWN"]; cutText [(localize "str_epoch_player_12"), "PLAIN DOWN"];
_sleep = 1;
}; };
case (!r_player_dead and player getVariable["combattimeout", 0] >= time) : { case (!r_player_dead and player getVariable["combattimeout", 0] >= time) : {
_btnAbort ctrlEnable false; _btnAbort ctrlEnable false;
//cutText ["Cannot Abort while in combat!", "PLAIN DOWN"]; //cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
cutText [localize "str_abort_playerincombat", "PLAIN DOWN"]; cutText [localize "str_abort_playerincombat", "PLAIN DOWN"];
_sleep = 1;
}; };
case (_timeOut < _timeMax) : { case (_timeOut < _timeMax) : {
_btnAbort ctrlEnable false; _btnAbort ctrlEnable false;
_btnAbort ctrlSetText format["%1 (in %2)", _btnAbortText, ceil (_timeMax - diag_tickTime)]; _btnAbort ctrlSetText format["%1 (in %2)", _btnAbortText, (ceil ((_timeMax - diag_tickTime)*10)/10)];
cutText ["", "PLAIN DOWN"];
_sleep = 0.1;
}; };
default { default {
_btnAbort ctrlEnable true; _btnAbort ctrlEnable true;
_btnAbort ctrlSetText _btnAbortText; _btnAbort ctrlSetText _btnAbortText;
cutText ["", "PLAIN DOWN"]; cutText ["", "PLAIN DOWN"];
_sleep = 1;
}; };
}; };
sleep 1; sleep _sleep;
_timeOut = diag_tickTime; _timeOut = diag_tickTime;
}; };
cutText ["", "PLAIN DOWN"]; cutText ["", "PLAIN DOWN"];