Repair - Add condition check to progressBar (#6830)

This commit is contained in:
PabstMirror 2019-02-22 18:54:25 -06:00 committed by GitHub
parent 3ee3c5de5a
commit 860fa0fcfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,12 +139,16 @@ if (_consumeItems > 0) then {
// Parse the config for the progress callback
private _callbackProgress = getText (_config >> "callbackProgress");
if (_callbackProgress == "") then {
_callbackProgress = "true";
};
if (isNil _callbackProgress) then {
_callbackProgress = compile _callbackProgress;
_callbackProgress = {
(_this select 0) params ["", "_target"];
(alive _target) && {(abs speed _target) < 1} // make sure vehicle doesn't drive off
};
} else {
_callbackProgress = missionNamespace getVariable _callbackProgress;
if (isNil _callbackProgress) then {
_callbackProgress = compile _callbackProgress;
} else {
_callbackProgress = missionNamespace getVariable _callbackProgress;
};
};