This commit is contained in:
PabstMirror 2015-05-01 12:58:56 -05:00
parent 8d1ac26e24
commit d8a6dd1bbd
2 changed files with 7 additions and 2 deletions

View File

@ -23,6 +23,9 @@ _returnAnimation = "";
_animationState = (animationState _unit);
_unitAnimationCfg = (configFile >> "CfgMovesMaleSdr" >> "States" >> _animationState);
//If we're already in a terminal animation just return current
if ((getNumber (_unitAnimationCfg >> "terminal")) == 1) exitWith {_animationState};
_unitActionsCfg = (configFile >> "CfgMovesBasic" >> "Actions" >> (getText (_unitAnimationCfg >> "actions")));
TRACE_2("Animation/Action", configName _unitAnimationCfg, configName _unitActionsCfg);
@ -42,4 +45,7 @@ if ((vehicle _unit) != _unit) then {
_returnAnimation = getText (_unitActionsCfg >> "die");
};
//Fallback if nothing valid found:
if (_returnAnimation == "") then {_returnAnimation = "Unconscious"};
_returnAnimation

View File

@ -35,8 +35,7 @@ if (!([_unit] call FUNC(isAwake))) then {
if (vehicle _unit == _vehicle) then {
_unit setVariable [QEGVAR(medical,vehicleAwakeAnim), [_vehicle, (animationState _unit)]];
};
[_unit,([_unit] call FUNC(getDeathAnim)), 1] call FUNC(doAnimation);
[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation);
};
} else {
if ([_unit] call FUNC(isArrested)) then {