Skip to content

Commit

Permalink
Fix typo in med and issue related to unconsciousness (#6411)
Browse files Browse the repository at this point in the history
* Fix adenosine displayname being wrong in some medical interactions

* Fix unconscious units waking up while being carried staying muted
  • Loading branch information
alganthe authored and PabstMirror committed Jun 28, 2018
1 parent e5a15d2 commit 09855f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions addons/medical/ACE_Medical_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ class ACE_LegLeft {
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Atropine);
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment));
EXCEPTIONS
Expand Down Expand Up @@ -707,7 +707,7 @@ class ACE_LegRight {
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Atropine);
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment));
EXCEPTIONS
Expand Down
6 changes: 3 additions & 3 deletions addons/medical/ACE_Medical_SelfActions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class Medical {
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Atropine);
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment));
Expand Down Expand Up @@ -402,7 +402,7 @@ class Medical {
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Atropine);
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment));
Expand Down Expand Up @@ -492,7 +492,7 @@ class Medical {
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Atropine);
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment));
Expand Down
6 changes: 6 additions & 0 deletions addons/medical/functions/fnc_unconsciousPFH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ if (!alive _unit) exitWith {
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith {
TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getVariable QGVAR(unconsciousArguments),animationState _unit);

//Unmute the unit before the carry check
_unit setVariable ["tf_voiceVolume", 1, true];
_unit setVariable ["tf_unable_to_use_radio", false, true];
_unit setVariable ["acre_sys_core_isDisabled", false, true];

// TODO, handle this with carry instead, so we can remove the PFH here.
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then {
Expand Down

0 comments on commit 09855f1

Please sign in to comment.