mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
8c7f8d7d6a
* Intensify pain effects * Add chromatic abberation effect, add blur with very high pain * Add option for limited pain effects with only high pain blur * Fix playInjuredSound * Add instant feedback effects update when getting hit * Cleanup * Overhaul playInjuredSound * Fix voice detection, simplify nearby unit filter * Apply suggestions from code review * Add Chromatic Aberration translations * Use while loop instead of configClasses * detach say3d dummies before deleting
43 lines
1.0 KiB
Plaintext
43 lines
1.0 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: BaerMitUmlaut
|
|
* Handles the hear beat sound.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [] call ace_medical_feedback_fnc_effectHeartBeat
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
private _heartRate = GET_HEART_RATE(ACE_player);
|
|
|
|
if (_heartRate == 0) exitWith {
|
|
TRACE_1("Ending heart beat effect - zero",_heartRate);
|
|
GVAR(heartBeatEffectRunning) = false;
|
|
};
|
|
private _waitTime = 60 / _heartRate;
|
|
|
|
// TRACE_2("",_heartRate,_waitTime);
|
|
|
|
switch (true) do {
|
|
case (_heartRate > 160): {
|
|
// playSound SND_HEARBEAT_FAST; // Array doesn't blend together well, just play one file consistently
|
|
playSound "ACE_heartbeat_fast_1";
|
|
[FUNC(effectHeartBeat), [], _waitTime] call CBA_fnc_waitAndExecute;
|
|
};
|
|
case (_heartRate < 60): {
|
|
playSound SND_HEARBEAT_SLOW;
|
|
[FUNC(effectHeartBeat), [], _waitTime] call CBA_fnc_waitAndExecute;
|
|
};
|
|
default {
|
|
TRACE_1("Ending heart beat effect - normal",_heartRate);
|
|
GVAR(heartBeatEffectRunning) = false;
|
|
};
|
|
};
|