Skip to content

Commit

Permalink
Repair - Add condition check to progressBar (#6830)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Feb 23, 2019
1 parent 3ee3c5d commit 860fa0f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions addons/repair/functions/fnc_repair.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};


Expand Down

0 comments on commit 860fa0f

Please sign in to comment.