Skip to content

Commit

Permalink
Fix support crew being provided for free and then refunded (#3367)
Browse files Browse the repository at this point in the history
* Fix support crew being provided for free and then refunded

* Fix wrong group var name in UAV for when it's reactivated
  • Loading branch information
jaj22 authored Aug 10, 2024
1 parent 7137bac commit da486be
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions A3A/addons/core/functions/Supports/fn_SUP_ASFRoutine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ _plane setVariable ["SupportData", _suppData]; // for use in EHs
private _group = [_side, _plane] call A3A_fnc_createVehicleCrew;
{ [_x, nil, false, _resPool] call A3A_fnc_NATOinit } forEach units _group;
_group deleteGroupWhenEmpty true;
[-10 * count units _group, _side, _resPool] call A3A_fnc_addEnemyResources;

_plane addEventHandler ["Killed", {
params ["_plane"];
Expand Down
2 changes: 2 additions & 0 deletions A3A/addons/core/functions/Supports/fn_SUP_CASRoutine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ private _group = [_side, _plane] call A3A_fnc_createVehicleCrew;
{ [_x, nil, false, _resPool] call A3A_fnc_NATOinit } forEach units _group;
_group deleteGroupWhenEmpty true;
_group setBehaviourStrong "CARELESS";
[-10 * count units _group, _side, _resPool] call A3A_fnc_addEnemyResources;


_plane addEventHandler ["Killed", {
params ["_plane"];
Expand Down
1 change: 1 addition & 0 deletions A3A/addons/core/functions/Supports/fn_SUP_UAVRoutine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ private _uav = createVehicle [_planeType, _spawnPos, [], 0, "FLY"];
[_side, _uav] call A3A_fnc_createVehicleCrew;
_groupVeh = group driver _uav;
{ [_x, nil, false, _resPool] call A3A_fnc_NATOinit } forEach (crew _uav); // arguable
[-10 * count units _groupVeh, _side, _resPool] call A3A_fnc_addEnemyResources;
[_uav, _side, _resPool] call A3A_fnc_AIVEHinit;

_wp = _groupVeh addWayPoint [_suppCenter, 0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ _group deleteGroupWhenEmpty true;
_x disableAI "TARGET";
_x disableAI "AUTOTARGET";
} forEach units _group;
[-10 * count units _group, _side, _resPool] call A3A_fnc_addEnemyResources;

// Should we really have these?
_plane addEventHandler ["Killed", {
Expand Down
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/Supports/fn_SUP_artillery.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ A3A_activeSupports pushBack _suppData;
[_reveal, _side, "ARTILLERY", _targPos, _delay] spawn A3A_fnc_showInterceptedSetupCall;

// Vehicle cost + extra support cost for balance
(A3A_vehicleResourceCosts get _vehType) + 200;
(A3A_vehicleResourceCosts get _vehType) + (10 * count units _group) + 200;
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/Supports/fn_SUP_mortar.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ A3A_activeSupports pushBack _suppData;
[_reveal, _side, "MORTAR", _targPos, _delay] spawn A3A_fnc_showInterceptedSetupCall;

// Mortar cost (might be free?) + extra support cost for balance
(A3A_vehicleResourceCosts getOrDefault [_vehType, 0]) + 100;
(A3A_vehicleResourceCosts getOrDefault [_vehType, 0]) + (10 * count units _group) + 100;

0 comments on commit da486be

Please sign in to comment.