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 inconsistent parameter bug with createAttackForceLand #3286

Merged
Show file tree
Hide file tree
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_createAttackForceLand.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Arguments:
<INTEGER> Total number of vehicles to create
<INTEGER> Number of attack/support vehicles to create
<INTEGER> Optional, tier modifier to apply to vehicle selection (Default: 0)
<STRING> Optional, troop type to use (Default: "Normal")
<BOOL> Optional, true to only use tanks (Default: false)
// <STRING> Optional, troop type to use (Default: "Normal")

Return array:
<SCALAR> Resources spent
Expand All @@ -25,7 +25,7 @@ Return array:
#include "..\..\script_component.hpp"
FIX_LINE_NUMBERS()

params ["_side", "_base", "_target", "_resPool", "_vehCount", "_vehAttackCount", ["_tierMod", 0], ["_tanksOnly", false]];
params ["_side", "_base", "_target", "_resPool", "_vehCount", "_vehAttackCount", ["_tierMod", 0], ["_troopType", "Normal"], ["_tanksOnly", false]];
private _targpos = if (_target isEqualType []) then { _target } else { markerPos _target };
private _transportRatio = 1 - _vehAttackCount / _vehCount;

Expand All @@ -44,7 +44,7 @@ private _landPosBlacklist = [];
for "_i" from 1 to _vehCount do {
private _vehType = selectRandomWeighted ([_supportPool, _transportPool] select _isTransport);

private _vehData = [_vehType, "Normal", _resPool, _landPosBlacklist, _side, _base, _targPos] call A3A_fnc_createAttackVehicle;
private _vehData = [_vehType, _troopType, _resPool, _landPosBlacklist, _side, _base, _targPos] call A3A_fnc_createAttackVehicle;
if !(_vehData isEqualType []) exitWith {
Error_1("Failed to spawn land vehicle at marker %1", _base);
}; // couldn't create for some reason, assume we're out of spawn places?
Expand Down
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/Supports/fn_SUP_tankRoutine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _suppData params ["_supportName", "_side", "_suppType", "_suppCenter", "_suppRad
sleep _sleepTime;

// Only spawn tanks
private _data = [_side, _base, _suppCenter, _resPool, _vehCount, _vehCount, 2, true] call A3A_fnc_createAttackForceLand;
private _data = [_side, _base, _suppCenter, _resPool, _vehCount, _vehCount, 2, "Normal", true] call A3A_fnc_createAttackForceLand;
_data params ["_resources", "_vehicles", "_crewGroups", "_cargoGroups"];
Info_1("Spawn performed: Vehicles %1", _vehicles apply { typeOf _x });

Expand Down