Common - Fix getAwakAnim for some vehicles (#8435)

This commit is contained in:
PabstMirror 2021-09-13 16:33:56 -05:00 committed by GitHub
parent 565aa8cf0e
commit 58730b82fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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