Skip to content

Commit

Permalink
Fix fallback code for militia lacking cargo trucks
Browse files Browse the repository at this point in the history
  • Loading branch information
jaj22 committed Jan 30, 2024
1 parent c1c0f57 commit 367d91a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/CREATE/fn_createAIOutposts.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ if (_spawnParameter isEqualType []) then
if (FactionGet(civ,"vehiclesCivFuel") isEqualTo [] and random 1 < 0.1) exitWith { selectRandom (_faction get "vehiclesFuelTrucks") };
private _types = if (!_isFIA) then {(_faction get "vehiclesTrucks") + (_faction get "vehiclesCargoTrucks")} else {_faction get "vehiclesMilitiaTrucks"};
_types = _types select { _x in FactionGet(all,"vehiclesCargoTrucks") };
if (count _types == 0) then { (_faction get "vehiclesCargoTrucks") } else { _types };
if (count _types == 0) then { _types = (_faction get "vehiclesCargoTrucks") };
selectRandom _types;
};
isNil {
Expand Down
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/CREATE/fn_createAIResources.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ if (_spawnParameter isEqualType []) then
if (FactionGet(civ,"vehiclesCivFuel") isEqualTo [] and random 1 < 0.1) exitWith { selectRandom (_faction get "vehiclesFuelTrucks") };
private _types = if (!_isFIA) then {(_faction get "vehiclesTrucks") + (_faction get "vehiclesCargoTrucks")} else {_faction get "vehiclesMilitiaTrucks"};
_types = _types select { _x in FactionGet(all,"vehiclesCargoTrucks") };
if (count _types == 0) then { (_faction get "vehiclesCargoTrucks") } else { _types };
if (count _types == 0) then { _types = (_faction get "vehiclesCargoTrucks") };
selectRandom _types;
};
isNil {
Expand Down

0 comments on commit 367d91a

Please sign in to comment.