Skip to content

Commit

Permalink
Common - Fix getAwakAnim for some vehicles (acemod#8435)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored and AndreasBrostrom committed Dec 3, 2021
1 parent 7530935 commit 5fa1a51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addons/common/functions/fnc_getAwakeAnim.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ if (_turret isNotEqualTo []) exitWith {
private _cargoIndex = _vehicle getCargoIndex _unit;

if (_cargoIndex != -1) exitWith {
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getArray (_config >> "cargoAction") select _cargoIndex) // return
private _cargoAction = getArray (_config >> "cargoAction");
_cargoIndex = _cargoIndex min (count _cargoAction - 1); // The array can be smaller than the max cargo index, just use last element
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> (_cargoAction select _cargoIndex)) // return
};

// --- default
Expand Down

0 comments on commit 5fa1a51

Please sign in to comment.