mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Improved patient unconscious animation
This commit is contained in:
parent
31b7ade057
commit
08e1949078
@ -19,6 +19,7 @@ class ACE_Medical_Actions {
|
|||||||
|
|
||||||
animationPatient = "";
|
animationPatient = "";
|
||||||
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
|
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
|
||||||
|
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"};
|
||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
|
||||||
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
||||||
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
||||||
@ -113,6 +114,7 @@ class ACE_Medical_Actions {
|
|||||||
itemConsumed = 1;
|
itemConsumed = 1;
|
||||||
animationPatient = "";
|
animationPatient = "";
|
||||||
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
|
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
|
||||||
|
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"};
|
||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
|
||||||
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
||||||
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
||||||
|
@ -137,9 +137,9 @@ _startingTime = time;
|
|||||||
|
|
||||||
// A check to ensure that the animation is being played properly.
|
// A check to ensure that the animation is being played properly.
|
||||||
// TODO: Might no longer be necessary: Have to test this in MP.
|
// 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 {
|
// 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.
|
//[_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;
|
}, 0.1, [_unit,_animState, _originalPos, _startingTime, _minWaitingTime, false] ] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
@ -90,11 +90,17 @@ if (isNil _callbackProgress) then {
|
|||||||
// Patient Animation
|
// Patient Animation
|
||||||
_patientAnim = getText (_config >> "animationPatient");
|
_patientAnim = getText (_config >> "animationPatient");
|
||||||
if (_target getvariable ["ACE_isUnconscious", false]) then {
|
if (_target getvariable ["ACE_isUnconscious", false]) then {
|
||||||
|
if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then {
|
||||||
_patientAnim = getText (_config >> "animationPatientUnconscious");
|
_patientAnim = getText (_config >> "animationPatientUnconscious");
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then {
|
if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then {
|
||||||
|
if (_target getvariable ["ACE_isUnconscious", false]) then {
|
||||||
[_target, _patientAnim, 2, true] call EFUNC(common,doAnimation);
|
[_target, _patientAnim, 2, true] call EFUNC(common,doAnimation);
|
||||||
|
} else {
|
||||||
|
[_target, _patientAnim, 1, true] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Player Animation
|
// Player Animation
|
||||||
|
@ -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 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 {
|
if (count _openWounds == 0) then {
|
||||||
_target setDamage 0;
|
_target setDamage 0;
|
||||||
// TODO also set hitpoints to 0
|
// _target setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
Loading…
Reference in New Issue
Block a user