Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong return from getOrDefault in fn_createAIAirplane.sqf #269

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions A3A/addons/core/functions/CREATE/fn_createAIAirplane.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ if (!_busy) then {
private _veh = objNull;
private _spawnParameter = [_markerX, "Plane"] call A3A_fnc_findSpawnPosition;
if(_spawnParameter isEqualType []) then {
private _vehPool = (_faction get "vehiclesPlanesCAS") + (_faction get "vehiclesPlanesAA") + (_faction getOrDefault ["vehiclesPlanesGunship", "vehiclesPlanesCAS"]) + (_faction getOrDefault ["uavsAttack", "vehiclesPlanesCAS"]);
private _vehPool = (_faction get "vehiclesPlanesCAS") + (_faction get "vehiclesPlanesAA") + (_faction getOrDefault ["vehiclesPlanesGunship", []]) + (_faction getOrDefault ["uavsAttack", []]);
if(count _vehPool > 0) then
{
_spawnsUsed pushBack _spawnParameter#2;
Expand All @@ -319,8 +319,8 @@ if (!_busy) then {
+ (_faction get "vehiclesPlanesCAS")
+ (_faction get "vehiclesPlanesAA")
+ (_faction get "vehiclesPlanesTransport");
+ (_faction getOrDefault ["vehiclesPlanesGunship", "vehiclesPlanesCAS"]);
+ (_faction getOrDefault ["uavsAttack", "vehiclesPlanesCAS"]);
+ (_faction getOrDefault ["vehiclesPlanesGunship", []]);
+ (_faction getOrDefault ["uavsAttack", []]);
_typeVehX = selectRandom _airVehTypes;
if (!isNil "_typeVehX") then {
_veh = createVehicle [_typeVehX, _pos, [],50, "NONE"];
Expand Down