-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev-Tomcat' into unneededNot
- Loading branch information
Showing
29 changed files
with
473 additions
and
172 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class ACE_Medical_Injuries { | ||
class damageTypes { | ||
class woundHandlers; | ||
class bullet { | ||
class woundHandlers: woundHandlers { | ||
GVAR(pulmoHit) = QFUNC(woundsHandlerPulmoHit); | ||
}; | ||
}; | ||
}; | ||
}; |
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,13 @@ | ||
class CfgGlasses | ||
{ | ||
class G_RegulatorMask_F; | ||
class kat_mask_solr: G_RegulatorMask_F | ||
{ | ||
author = "MrAdrianPL + KJW"; | ||
displayname = "SOLR Oxygen Mask"; | ||
model = QPATHTOF(models\solr\kat_mask_solr.p3d); | ||
picture = QPATHTOF(ui\maskSOLR.paa); | ||
identityTypes[] = {}; | ||
mass = 4; | ||
}; | ||
}; |
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 was deleted.
Oops, something went wrong.
129 changes: 129 additions & 0 deletions
129
addons/breathing/functions/fnc_woundsHandlerPulmoHit.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,129 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Katalam, LinkIsGrim | ||
* Called when a unit is damaged. | ||
* | ||
* Arguments: | ||
* 0: Unit That Was Hit <OBJECT> | ||
* 1: Damage done to each body part <ARRAY> | ||
* 0: Engine damage <NUMBER> | ||
* 1: Body part <STRING> | ||
* 2: Real damage <NUMBER> | ||
* 2: Damage type (unused) <STRING> | ||
* 3: Ammo (unused) <STRING> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [cursorTarget, [1, "Body", 2], "bullet", "B_556x45_Ball"] call kat_breathing_fnc_woundsHandlerPulmoHit | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_unit", "_allDamages"]; | ||
(_allDamages select 0) params ["_engineDamage", "_bodyPart"]; // selection-specific | ||
|
||
if !(GVAR(enable) && _bodyPart == "body") exitWith {_this}; | ||
|
||
//Other mods can utilise KAT_Pneumothorax_Exclusion variable to prevent Pneumothorax from happening | ||
if (_engineDamage < GVAR(pneumothoraxDamageThreshold) || _unit getVariable ["KAT_Pneumothorax_Exlusion", false]) exitWith {_this}; | ||
|
||
private _chanceIncrease = 0; | ||
if (GVAR(pneumothoraxDamageThreshold_TakenDamage)) then { | ||
_chanceIncrease = linearConversion [GVAR(pneumothoraxDamageThreshold), 3, _engineDamage, 0, 30, true]; | ||
}; | ||
|
||
// Damage threshold passed & pneumothorax given | ||
if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) exitWith { | ||
private _hasTensionPneumothorax = _unit getVariable [QGVAR(tensionpneumothorax), false]; | ||
private _initialPneumothorax = (_unit getVariable [QGVAR(pneumothorax), 0]) == 0; | ||
|
||
switch (true) do { | ||
case (_hasTensionPneumothorax): { // fully deteriorate pneumothorax | ||
_unit setVariable [QGVAR(pneumothorax), 4, true]; | ||
_unit setVariable [QGVAR(activeChestSeal), false, true]; | ||
}; | ||
case (_initialPneumothorax): { | ||
// Set pain to at least 0.2 | ||
[_unit, 0.2] call ACEFUNC(medical_status,adjustPainLevel); | ||
|
||
// add breathing sound | ||
_unit setVariable [QGVAR(pneumothorax), 1, true]; | ||
_unit setVariable [QGVAR(deepPenetratingInjury), true, true]; | ||
_unit setVariable [QGVAR(activeChestSeal), false, true]; | ||
|
||
// Start deteriorating after delay | ||
[_unit, _chanceIncrease] call FUNC(handlePneumothoraxDeterioration); | ||
}; | ||
|
||
case (GVAR(advPtxEnable)): { | ||
// Roll chance to get advanced pneumothorax while afflicted with early stage of pneumothorax | ||
[_unit, _chanceIncrease] call FUNC(inflictAdvancedPneumothorax); | ||
}; | ||
}; | ||
|
||
_this // return | ||
}; | ||
|
||
// Damage threshold was passed but no pneumothorax given, try to just give injury instead | ||
|
||
// No injury | ||
if (floor (random 100) >= GVAR(deepPenetratingInjuryChance)) exitWith {_this}; | ||
|
||
_unit setVariable [QGVAR(deepPenetratingInjury), true, true]; | ||
_unit setVariable [QGVAR(activeChestSeal), false, true]; | ||
|
||
// Check for tamponade | ||
|
||
// Unit already has it or got lucky | ||
if ((_unit getVariable [QEGVAR(circulation,effusion), 0]) != 0 || floor (random 100) > EGVAR(circulation,tamponadeChance)) exitWith {_this}; | ||
|
||
_unit setVariable [QEGVAR(circulation,effusion), 1, true]; | ||
|
||
[{ | ||
params ["_unit"]; | ||
|
||
if (_unit getVariable [QEGVAR(circulation,effusion), 0] > 0) then { | ||
// Try to deteriorate at set interval | ||
[{ | ||
params ["_args", "_idPFH"]; | ||
_args params ["_unit"]; | ||
|
||
private _effusion = _unit getVariable [QEGVAR(circulation,effusion), 0]; | ||
|
||
// If patient is dead, already treated or has already deteriorated into full tamponade, kill the PFH | ||
if ((_effusion == 0) || !(alive _unit) || (_effusion == 4)) exitWith { | ||
[_idPFH] call CBA_fnc_removePerFrameHandler; | ||
}; | ||
|
||
if (floor (random 100) <= EGVAR(circulation,deterioratingTamponade_chance)) then { | ||
private _effusionTarget = _effusion + 1; | ||
|
||
// Once deteriorated far enough try to inflict tamponade | ||
if (_effusionTarget == 4) exitWith { | ||
private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; | ||
|
||
if ((_ht findIf {_x isEqualTo "tamponade"}) == -1) then { | ||
_ht pushBack "tamponade"; | ||
|
||
if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { | ||
[QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; | ||
}; | ||
|
||
_unit setVariable [QEGVAR(circulation,ht), _ht, true]; | ||
}; | ||
|
||
[_idPFH] call CBA_fnc_removePerFrameHandler; | ||
}; | ||
|
||
_unit setVariable [QEGVAR(circulation,effusion), _effusionTarget, true]; | ||
[_unit, 0.5 * (_effusionTarget / 4)] call ACEFUNC(medical_status,adjustPainLevel); // Adjust pain based on severity | ||
[_unit, -10, -10, "cardiac_tension"] call EFUNC(circulation,updateBloodPressureChange); // Emulate low blood pressure and low heart rate caused by tamponade | ||
}; | ||
|
||
}, EGVAR(circulation,deterioratingTamponade_interval), [_unit]] call CBA_fnc_addPerFrameHandler; | ||
}; | ||
}, [_unit], EGVAR(circulation,deterioratingTamponade_interval)] call CBA_fnc_waitAndExecute; | ||
|
||
_this // return |
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,72 @@ | ||
ambient[] = { 1, 1, 1, 1 }; | ||
diffuse[] = { 1, 1, 1, 1 }; | ||
forcedDiffuse[] = { 0, 0, 0, 1 }; | ||
emmisive[] = { 0, 0, 0, 1 }; | ||
specular[] = { 0.2, 0.2, 0.2, 0.1 }; | ||
specularPower = 30; | ||
PixelShaderID = "Super"; | ||
VertexShaderID = "Super"; | ||
class Stage1 { | ||
texture = "x\kat\addons\breathing\models\solr\camo1_nohq.paa"; | ||
uvSource = "tex"; | ||
class uvTransform { | ||
aside[] = { 1, 0, 0 }; | ||
up[] = { 0, 1, 0 }; | ||
dir[] = { 0, 0, 0 }; | ||
pos[] = { 0, 0, 0 }; | ||
}; | ||
}; | ||
class Stage2 { | ||
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,dt)"; | ||
uvSource = "tex"; | ||
class uvTransform { | ||
aside[] = { 1, 1, 0 }; | ||
up[] = { 0, 1, 0 }; | ||
dir[] = { 0, 0, 0 }; | ||
pos[] = { 0, 0, 0 }; | ||
}; | ||
}; | ||
class Stage3 { | ||
texture = "#(argb,8,8,3)color(0,0,0,0,mc)"; | ||
uvSource = "tex"; | ||
class uvTransform { | ||
aside[] = { 1, 0, 0 }; | ||
up[] = { 0, 1, 0 }; | ||
dir[] = { 0, 0, 0 }; | ||
pos[] = { 0, 0, 0 }; | ||
}; | ||
}; | ||
class Stage4 { | ||
texture = "x\kat\addons\breathing\models\solr\camo1_as.paa"; | ||
uvSource = "tex"; | ||
class uvTransform { | ||
aside[] = { 1, 0, 0 }; | ||
up[] = { 0, 1, 0 }; | ||
dir[] = { 0, 0, 1 }; | ||
pos[] = { 0, 0, 1 }; | ||
}; | ||
}; | ||
class Stage5 { | ||
texture = "x\kat\addons\breathing\models\solr\camo1_smdi.paa"; | ||
uvSource = "tex"; | ||
class uvTransform { | ||
aside[] = { 1, 0, 0 }; | ||
up[] = { 0, 1, 0 }; | ||
dir[] = { 0, 0, 0 }; | ||
pos[] = { 0, 0, 0 }; | ||
}; | ||
}; | ||
class Stage6 { | ||
texture = "#(ai,64,64,1)fresnel(0.4,0.1)"; | ||
uvSource = "tex"; | ||
class uvTransform { | ||
aside[] = { 1, 0, 0 }; | ||
up[] = { 0, 1, 0 }; | ||
dir[] = { 0, 0, 1 }; | ||
pos[] = { 0, 0, 0 }; | ||
}; | ||
}; | ||
|
||
class StageTI { | ||
texture = "a3\data_f\default_vehicle_ti_ca.paa"; | ||
}; |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.