diff --git a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf index d1edaa7ccc..f7ec2dd540 100644 --- a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf @@ -142,7 +142,6 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra }; case (_causeFracture && {EGVAR(medical,fractures) > 0} && {_bodyPartNToAdd > 1} && {_woundDamage > FRACTURE_DAMAGE_THRESHOLD}): { TRACE_1("limb fracture",_bodyPartNToAdd); - // todo: play sound? private _fractures = GET_FRACTURES(_unit); _fractures set [_bodyPartNToAdd, 1]; _unit setVariable [VAR_FRACTURES, _fractures, true]; diff --git a/addons/medical_feedback/CfgSounds.hpp b/addons/medical_feedback/CfgSounds.hpp index 077c32ba5e..be641ef27f 100644 --- a/addons/medical_feedback/CfgSounds.hpp +++ b/addons/medical_feedback/CfgSounds.hpp @@ -34,4 +34,24 @@ class CfgSounds { sound[] = {QPATHTOF(sounds\slow_2.wav), "db+1", 1}; titles[] = {}; }; + class ACE_fracture_1 { + name = "ACE_fracture_1"; + sound[] = {QPATHTOF(sounds\fracture_1.wav), "db+1", 1}; + titles[] = {}; + }; + class ACE_fracture_2 { + name = "ACE_fracture_2"; + sound[] = {QPATHTOF(sounds\fracture_2.wav), "db+1", 1}; + titles[] = {}; + }; + class ACE_fracture_3 { + name = "ACE_fracture_3"; + sound[] = {QPATHTOF(sounds\fracture_3.wav), "db+1", 1}; + titles[] = {}; + }; + class ACE_fracture_4 { + name = "ACE_fracture_4"; + sound[] = {QPATHTOF(sounds\fracture_4.wav), "db+1", 1}; + titles[] = {}; + }; }; diff --git a/addons/medical_feedback/XEH_postInit.sqf b/addons/medical_feedback/XEH_postInit.sqf index ece7297f4d..45054daccc 100644 --- a/addons/medical_feedback/XEH_postInit.sqf +++ b/addons/medical_feedback/XEH_postInit.sqf @@ -10,6 +10,14 @@ [_unit, "moan", PAIN_TO_MOAN(_painLevel)] call FUNC(playInjuredSound); }] call CBA_fnc_addEventHandler; +[QEGVAR(medical,fracture), { + params ["_unit"]; + + if (_unit == ACE_player) then { + playSound SND_FRACTURE; + }; +}] call CBA_fnc_addEventHandler; + if (!hasInterface) exitWith {}; GVAR(nextFadeIn) = 0; diff --git a/addons/medical_feedback/script_component.hpp b/addons/medical_feedback/script_component.hpp index e39fa42c8b..dc2c3baf9c 100644 --- a/addons/medical_feedback/script_component.hpp +++ b/addons/medical_feedback/script_component.hpp @@ -34,5 +34,6 @@ #define SND_HEARBEAT_FAST (selectRandom ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"]) #define SND_HEARBEAT_NORMAL (selectRandom ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"]) #define SND_HEARBEAT_SLOW (selectRandom ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]) +#define SND_FRACTURE (selectRandom ["ACE_fracture_1", "ACE_fracture_2", "ACE_fracture_3", "ACE_fracture_4"]) #define VOL_UNCONSCIOUS 0.25 diff --git a/addons/medical_feedback/sounds/fracture_1.wav b/addons/medical_feedback/sounds/fracture_1.wav new file mode 100644 index 0000000000..b68a71da55 Binary files /dev/null and b/addons/medical_feedback/sounds/fracture_1.wav differ diff --git a/addons/medical_feedback/sounds/fracture_2.wav b/addons/medical_feedback/sounds/fracture_2.wav new file mode 100644 index 0000000000..2725a8769e Binary files /dev/null and b/addons/medical_feedback/sounds/fracture_2.wav differ diff --git a/addons/medical_feedback/sounds/fracture_3.wav b/addons/medical_feedback/sounds/fracture_3.wav new file mode 100644 index 0000000000..c96126b15c Binary files /dev/null and b/addons/medical_feedback/sounds/fracture_3.wav differ diff --git a/addons/medical_feedback/sounds/fracture_4.wav b/addons/medical_feedback/sounds/fracture_4.wav new file mode 100644 index 0000000000..0ff6a9e008 Binary files /dev/null and b/addons/medical_feedback/sounds/fracture_4.wav differ diff --git a/addons/medical_gui/ui/splint.paa b/addons/medical_gui/ui/splint.paa index 521809124a..8cd9866d5e 100644 Binary files a/addons/medical_gui/ui/splint.paa and b/addons/medical_gui/ui/splint.paa differ diff --git a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp index 6ad81d7a5c..31d009ec63 100644 --- a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp +++ b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp @@ -103,7 +103,9 @@ class GVAR(actions) { treatmentTime = 7; callbackSuccess = QFUNC(splint); condition = QFUNC(canSplint); - litter[] = {}; + litter[] = { + {"ACE_MedicalLitter_splint"}, {}, {} + }; }; // - Syringes ------------------------------------------------------------- diff --git a/addons/medical_treatment/CfgReplacementItems.hpp b/addons/medical_treatment/CfgReplacementItems.hpp index 4c5c4f126d..295935e055 100644 --- a/addons/medical_treatment/CfgReplacementItems.hpp +++ b/addons/medical_treatment/CfgReplacementItems.hpp @@ -11,7 +11,8 @@ class EGVAR(medical,replacementItems) { {"ACE_epinephrine", 1}, {"ACE_morphine", 1}, {"ACE_salineIV_250", 1}, - {"ACE_tourniquet", 1} + {"ACE_tourniquet", 1}, + {"ACE_splint", 2} }; // todo: add GM medical items }; diff --git a/addons/medical_treatment/CfgVehicles.hpp b/addons/medical_treatment/CfgVehicles.hpp index 39940da4fc..d7e0ed50d3 100644 --- a/addons/medical_treatment/CfgVehicles.hpp +++ b/addons/medical_treatment/CfgVehicles.hpp @@ -74,6 +74,9 @@ class CfgVehicles { class ACE_MedicalLitter_QuickClot: ACE_MedicalLitterBase { model = QPATHTOF(data\littergeneric_Quikclot.p3d); }; + class ACE_MedicalLitter_splint: ACE_MedicalLitterBase { + model = QPATHTOF(data\littergeneric_splint.p3d); + }; // Treatment items class Item_Base_F; @@ -117,6 +120,16 @@ class CfgVehicles { MACRO_ADDITEM(ACE_tourniquet,1); }; }; + class ACE_splintItem: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(splint_Display); + author = ECSTRING(common,ACETeam); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_splint,1); + }; + }; class ACE_morphineItem: Item_Base_F { scope = 2; scopeCurator = 2; @@ -292,6 +305,7 @@ class CfgVehicles { MACRO_ADDITEM(ACE_packingBandage,25); MACRO_ADDITEM(ACE_elasticBandage,25); MACRO_ADDITEM(ACE_tourniquet,15); + MACRO_ADDITEM(ACE_splint,15); MACRO_ADDITEM(ACE_morphine,15); MACRO_ADDITEM(ACE_adenosine,15); MACRO_ADDITEM(ACE_atropine,15); diff --git a/addons/medical_treatment/CfgWeapons.hpp b/addons/medical_treatment/CfgWeapons.hpp index cbc9f8b3bd..afbf3faa4a 100644 --- a/addons/medical_treatment/CfgWeapons.hpp +++ b/addons/medical_treatment/CfgWeapons.hpp @@ -71,8 +71,8 @@ class CfgWeapons { scope = 2; author = ECSTRING(common,ACETeam); displayName = CSTRING(splint_Display); - picture = QPATHTOF(ui\tourniquet_ca.paa); - model = QPATHTOF(data\tourniquet.p3d); + picture = QPATHTOF(ui\splint_ca.paa); + model = QPATHTOF(data\splint.p3d); descriptionShort = CSTRING(splint_Desc_Short); class ItemInfo: CBA_MiscItem_ItemInfo { mass = 2; diff --git a/addons/medical_treatment/data/littergeneric_splint.p3d b/addons/medical_treatment/data/littergeneric_splint.p3d new file mode 100644 index 0000000000..4918cacaf4 Binary files /dev/null and b/addons/medical_treatment/data/littergeneric_splint.p3d differ diff --git a/addons/medical_treatment/data/model.cfg b/addons/medical_treatment/data/model.cfg index 58f288c3b9..344141e28e 100644 --- a/addons/medical_treatment/data/model.cfg +++ b/addons/medical_treatment/data/model.cfg @@ -47,6 +47,7 @@ class CfgModels { class bandage: Default {}; class bodybagItem: Default {}; class epinephrine: Default {}; + class splint: Default {}; class IVBagBase: Default { sectionsInherit = ""; @@ -69,6 +70,7 @@ class CfgModels { class littergeneric_morphine: Default {}; class littergeneric_packingbandage: Default {}; class littergeneric_Quikclot: Default {}; + class littergeneric_splint: Default {}; class morphine: Default {}; class packingbandage: Default {}; class QuikClot: Default {}; diff --git a/addons/medical_treatment/data/splint.p3d b/addons/medical_treatment/data/splint.p3d new file mode 100644 index 0000000000..20cbe0a5d0 Binary files /dev/null and b/addons/medical_treatment/data/splint.p3d differ diff --git a/addons/medical_treatment/data/splint.rvmat b/addons/medical_treatment/data/splint.rvmat new file mode 100644 index 0000000000..69af44f738 --- /dev/null +++ b/addons/medical_treatment/data/splint.rvmat @@ -0,0 +1,92 @@ +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={1,1,1,0}; +specularPower=50; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 +{ + texture="z\ace\addons\medical_treatment\data\splint_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,0,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="z\ace\addons\medical_treatment\data\splint_as.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage5 +{ + texture="z\ace\addons\medical_treatment\data\splint_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(2,0.1)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage7 +{ + texture="a3\data_f\env_land_co.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; diff --git a/addons/medical_treatment/data/splint_as.paa b/addons/medical_treatment/data/splint_as.paa new file mode 100644 index 0000000000..810525bdab Binary files /dev/null and b/addons/medical_treatment/data/splint_as.paa differ diff --git a/addons/medical_treatment/data/splint_ca.paa b/addons/medical_treatment/data/splint_ca.paa new file mode 100644 index 0000000000..cff2ab6ff8 Binary files /dev/null and b/addons/medical_treatment/data/splint_ca.paa differ diff --git a/addons/medical_treatment/data/splint_nohq.paa b/addons/medical_treatment/data/splint_nohq.paa new file mode 100644 index 0000000000..2ed96ef112 Binary files /dev/null and b/addons/medical_treatment/data/splint_nohq.paa differ diff --git a/addons/medical_treatment/data/splint_smdi.paa b/addons/medical_treatment/data/splint_smdi.paa new file mode 100644 index 0000000000..e9c4efb07b Binary files /dev/null and b/addons/medical_treatment/data/splint_smdi.paa differ diff --git a/addons/medical_treatment/ui/splint_ca.paa b/addons/medical_treatment/ui/splint_ca.paa new file mode 100644 index 0000000000..ea09181ef0 Binary files /dev/null and b/addons/medical_treatment/ui/splint_ca.paa differ