Improved patient unconscious animation

This commit is contained in:
Glowbal 2015-04-04 18:08:41 +02:00
parent 31b7ade057
commit 08e1949078
4 changed files with 14 additions and 6 deletions

View File

@ -19,6 +19,7 @@ class ACE_Medical_Actions {
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
@ -113,6 +114,7 @@ class ACE_Medical_Actions {
itemConsumed = 1;
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";

View File

@ -137,9 +137,9 @@ _startingTime = time;
// A check to ensure that the animation is being played properly.
// TODO: Might no longer be necessary: Have to test this in MP.
if (vehicle _unit == _unit && {animationState _unit != "deadState" && animationState _unit != "unconscious"} && {(isNull ([_unit] call EFUNC(common,getCarriedBy)))} && (time - _startingTime >= 0.5)) then {
[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call EFUNC(common,doAnimation); // Reset animations if unit starts doing wierd things.
};
// if (vehicle _unit == _unit && {animationState _unit != "deadState" && animationState _unit != "unconscious"} && {(isNull ([_unit] call EFUNC(common,getCarriedBy)))} && (time - _startingTime >= 0.5)) then {
//[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call EFUNC(common,doAnimation); // Reset animations if unit starts doing wierd things.
//};
}, 0.1, [_unit,_animState, _originalPos, _startingTime, _minWaitingTime, false] ] call CBA_fnc_addPerFrameHandler;

View File

@ -90,11 +90,17 @@ if (isNil _callbackProgress) then {
// Patient Animation
_patientAnim = getText (_config >> "animationPatient");
if (_target getvariable ["ACE_isUnconscious", false]) then {
_patientAnim = getText (_config >> "animationPatientUnconscious");
if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then {
_patientAnim = getText (_config >> "animationPatientUnconscious");
};
};
if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then {
[_target, _patientAnim, 2, true] call EFUNC(common,doAnimation);
if (_target getvariable ["ACE_isUnconscious", false]) then {
[_target, _patientAnim, 2, true] call EFUNC(common,doAnimation);
} else {
[_target, _patientAnim, 1, true] call EFUNC(common,doAnimation);
};
};
// Player Animation

View File

@ -99,7 +99,7 @@ if (_impact > 0) then {
// If all wounds have been bandaged, we will reset all damage to 0, so the unit is not showing any blood on the model anymore.
if (count _openWounds == 0) then {
_target setDamage 0;
// TODO also set hitpoints to 0
// _target setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
};
true;