-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into dev-Tomcat
- Loading branch information
Showing
39 changed files
with
847 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
addons/breathing/functions/fnc_handleBreathingConditions.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Mazinski | ||
* Monitors breathing conditions. | ||
* | ||
* Arguments: | ||
* 0: Unit <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player] call kat_breathing_fnc_handleBreathingConcidtions; | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_unit"]; | ||
|
||
[{ | ||
params ["_args", "_idPFH"]; | ||
_args params ["_unit"]; | ||
|
||
private _alive = alive _unit; | ||
|
||
if (!_alive) exitWith { | ||
[_idPFH] call CBA_fnc_removePerFrameHandler; | ||
}; | ||
|
||
private _spo2 = GET_KAT_SPO2(_unit); | ||
|
||
if (GVAR(staminaLossAtLowSPO2)) then { | ||
if (!(_unit getVariable ["ACE_isUnconscious",false]) && {_spo2 <= GVAR(lowSPO2Level)}) then { | ||
if (ACEGVAR(advanced_fatigue,enabled)) then { | ||
["kat_LSDF", 1.5] call ACEFUNC(advanced_fatigue,addDutyFactor); | ||
} else { | ||
_unit setStamina(getStamina _unit - 3); | ||
}; | ||
} else { | ||
["kat_LSDF"] call ACEFUNC(advanced_fatigue,removeDutyFactor); | ||
}; | ||
}; | ||
}, 10, [_unit]] call CBA_fnc_addPerFrameHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
PREP(effectBreathingWheeze); | ||
PREP(effectCoughing); | ||
PREP(effectLowSpO2); | ||
PREP(effectOpioid); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Mazinski | ||
* Triggers the wheezing effect. | ||
* | ||
* Arguments: | ||
* 0: Enable <BOOL> | ||
* 1: Intensity <NUMBER> | ||
* 2: Unit <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [true, 0.5, player] call kat_feedback_fnc_effectBreathingWheeze; | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_enable", "_effected", "_unit"]; | ||
if (!_enable || !_effected) exitWith { false }; | ||
|
||
if (!(_unit getVariable [QEGVAR(breathing,PneumoBreathCooldownOn), false])) then { | ||
_unit setVariable [QEGVAR(breathing,PneumoBreathCooldownOn), true, true]; | ||
|
||
private _soundTargets = allPlayers inAreaArray [ASLToAGL getPosASL _unit, 15, 15, 0, false, 15]; | ||
|
||
if !(_soundTargets isEqualTo []) then { | ||
[QEGVAR(breathing,playCough), [_unit], _soundTargets] call CBA_fnc_targetEvent; | ||
}; | ||
|
||
[{ | ||
params["_unit"]; | ||
_unit setVariable [QEGVAR(breathing,PneumoBreathCooldownOn), false, true]; | ||
}, | ||
[_unit], 20] call CBA_fnc_waitAndExecute; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class CfgSounds { | ||
class GVAR(watchAlarm) { | ||
name = QGVAR(watchAlarm); | ||
sound[] = | ||
{ | ||
QPATHTOF(audio\watchAlarm.ogg), | ||
5, | ||
1, | ||
10 | ||
}; | ||
titles[] = {}; | ||
}; | ||
class GVAR(watchVibrate) { | ||
name = QGVAR(watchVibrate); | ||
sound[] = | ||
{ | ||
QPATHTOF(audio\watchVibrate.ogg), | ||
5, | ||
1, | ||
10 | ||
}; | ||
titles[] = {}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.