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 getAllRearmTurrets #6224

Merged
merged 1 commit into from
Apr 8, 2018
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
8 changes: 6 additions & 2 deletions addons/rearm/functions/fnc_getAllRearmTurrets.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This function just adds driver turret to the array returned by "allTurrets".
*
* Arguments:
* 0: Vehicle <OBJECT>
* 0: Vehicle <OBJECT><STRING>
*
* Return Value:
* Turret paths <ARRAY>
Expand All @@ -20,7 +20,11 @@

params ["_vehicle"];

private _turrets = allTurrets _vehicle;
private _turrets = if (_vehicle isEqualType objNull) then {
allTurrets _vehicle;
} else {
[_vehicle] call BIS_fnc_allTurrets; // "Does what allTurrets command does, except the param is vehicle's config class name"
};

// Adding the driver turret "[-1]".
_turrets pushBack [-1];
Expand Down