simplify timer build timer

This commit is contained in:
[VB]AWOL
2013-10-11 13:06:55 -05:00
parent b20a6e2948
commit 474135fcdf

View File

@@ -184,7 +184,7 @@ if (_hasrequireditem) then {
_position = getPosATL _object; _position = getPosATL _object;
cutText ["Planning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to build.", "PLAIN DOWN"]; cutText ["Planning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to build.", "PLAIN DOWN"];
_counter = time; _previewCounter = 60;
_objHupDiff = 0; _objHupDiff = 0;
_objHdwnDiff = 0; _objHdwnDiff = 0;
@@ -315,7 +315,10 @@ if (_hasrequireditem) then {
deleteVehicle _object; deleteVehicle _object;
}; };
if((time-_counter) >= 60) exitWith { cutText [format["%1",_previewCounter], "PLAIN DOWN"];
_previewCounter = _previewCounter - 1;
if(_previewCounter <= 0) exitWith {
_isOk = false; _isOk = false;
_cancel = true; _cancel = true;
_reason = "Ran out of time to find position."; _reason = "Ran out of time to find position.";
@@ -331,8 +334,6 @@ if (_hasrequireditem) then {
deleteVehicle _object; deleteVehicle _object;
}; };
cutText [format["%1",(time-_counter)], "PLAIN DOWN"];
if (player getVariable["combattimeout", 0] >= time) exitWith { if (player getVariable["combattimeout", 0] >= time) exitWith {
_isOk = false; _isOk = false;
_cancel = true; _cancel = true;