Skip to content

Commit

Permalink
Redoing this
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkIsGrim committed Aug 11, 2021
1 parent e6a0772 commit 80ff709
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addons/medical_feedback/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ GVAR(bloodTickCounter) = 0;
[true, _unit] call EFUNC(common,setVolume);

[QUOTE(ADDON), 1, false] call EFUNC(common,setHearingCapability);

//Force stop heart beat effect
GVAR(heartBeatEffectRunning) = false;

}] call CBA_fnc_addEventHandler;

// Update effects to match new unit's current status (this also handles respawn)
Expand Down
4 changes: 4 additions & 0 deletions addons/medical_feedback/functions/fnc_effectHeartBeat.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

private _heartRate = GET_HEART_RATE(ACE_player);

if (!GVAR(heartBeatEffectRunning)) exitWith {
TRACE_1("Ending heart beat effect - force stopped",_heartRate);
};

if (_heartRate == 0) exitWith {
TRACE_1("Ending heart beat effect - zero",_heartRate);
GVAR(heartBeatEffectRunning) = false;
Expand Down
1 change: 1 addition & 0 deletions addons/medical_feedback/functions/fnc_handleEffects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if (EGVAR(common,OldIsCamera) || {!alive ACE_player}) exitWith {
[false] call FUNC(effectBloodVolume);
[false] call FUNC(effectBloodVolumeIcon);
[false] call FUNC(effectBleeding);
GVAR(heartBeatEffectRunning) = false;
};

BEGIN_COUNTER(handleEffects);
Expand Down

0 comments on commit 80ff709

Please sign in to comment.