Merge pull request #6301 from acemod/medical-rewrite-restructure

Restructure medical rewrite
This commit is contained in:
Thomas Kooi 2018-07-18 20:25:02 +02:00 committed by GitHub
commit 3bbc1d21e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
387 changed files with 6269 additions and 6624 deletions

View File

@ -1,112 +0,0 @@
// Manual transitions applied to this statemachine
// - medical_fnc_handleRespawn:18
class ACE_Medical_StateMachine {
list = "allUnits select {local _x}";
skipNull = 1;
class Default {
onState = QUOTE(DFUNC(handleStateDefault));
class Injury {
targetState = "Injured";
events[] = {QGVAR(Injury)};
};
class CriticalInjuryOrVitals {
targetState = "Unconscious";
events[] = {QGVAR(CriticalInjury), QGVAR(CriticalVitals), QGVAR(knockOut)};
};
class FatalVitals {
targetState = "CardiacArrest";
events[] = {QGVAR(FatalVitals)};
};
class FatalInjury {
targetState = "FatalInjury";
events[] = {QGVAR(FatalInjury)};
};
};
class Injured {
onState = QUOTE(DFUNC(handleStateInjured));
class FullHeal {
targetState = "Default";
events[] = {QGVAR(FullHeal)};
};
class CriticalInjuryOrVitals {
targetState = "Unconscious";
events[] = {QGVAR(CriticalInjury), QGVAR(CriticalVitals), QGVAR(knockOut)};
};
class FatalVitals {
targetState = "CardiacArrest";
events[] = {QGVAR(FatalVitals)};
};
class FatalInjury {
targetState = "FatalInjury";
events[] = {QGVAR(FatalInjury)};
};
};
class Unconscious {
onState = QUOTE(DFUNC(handleStateUnconscious));
onStateEntered = QUOTE([ARR_2(_this,(true))] call FUNC(setUnconsciousStatemachine));
class DeathAI {
targetState = "Dead";
condition = QUOTE(!isPlayer _this && {GVAR(unconsciousConditionAI)});
};
class WakeUp {
targetState = "Injured";
condition = QUOTE(_this call FUNC(hasStableVitals));
events[] = {QGVAR(WakeUp)};
onTransition = QUOTE([ARR_2(_this,(false))] call FUNC(setUnconsciousStatemachine));
};
class FatalTransitions {
targetState = "CardiacArrest";
events[] = {QGVAR(FatalVitals)};
};
class FatalInjury {
targetState = "FatalInjury";
events[] = {QGVAR(FatalInjury)};
};
};
class FatalInjury {
// Transition state for handling instant death
// This state raises the next transition in the same frame
onStateEntered = QUOTE(DFUNC(enteredStateFatalInjury));
class DeathAI {
events[] = {QGVAR(FatalInjuryInstantTransition)};
targetState = "Dead";
condition = QUOTE(!isPlayer _this && {GVAR(fatalInjuryConditionAI)});
};
class SecondChance {
events[] = {QGVAR(FatalInjuryInstantTransition)};
targetState = "CardiacArrest";
condition = QUOTE(GVAR(fatalInjuryCondition) > 0);
onTransition = QUOTE(DFUNC(transitionSecondChance));
};
class Death {
events[] = {QGVAR(FatalInjuryInstantTransition)};
targetState = "Dead";
condition = "true";
};
};
class CardiacArrest {
onStateEntered = QUOTE(DFUNC(enteredStateCardiacArrest));
onStateLeaving = QUOTE(DFUNC(leftStateCardiacArrest));
class DeathAI {
targetState = "Dead";
condition = QUOTE(!isPlayer _this && {GVAR(fatalInjuryConditionAI)});
};
class Timeout {
targetState = "Dead";
condition = QUOTE(DFUNC(conditionCardiacArrestTimer));
};
class Reanimation {
targetState = "Unconscious";
events[] = {QGVAR(CPRSucceeded)};
};
class Execution {
targetState = "Dead";
condition = QUOTE(DFUNC(conditionExecutionDeath));
events[] = {QGVAR(FatalInjury)};
};
};
class Dead {
onStateEntered = "_this setDamage 1"; // killing a unit also exits the state machine for this unit
};
};

View File

@ -60,7 +60,6 @@ class ACE_Settings {
description = CSTRING(MedicalSettings_advancedDiagnose_Description);
typeName = "BOOL";
value = 1;
sliderSettings[] = {0, 25, 1, 1};
};
class GVAR(woundReopening) {
category = CSTRING(Category_Medical);
@ -68,7 +67,6 @@ class ACE_Settings {
description = CSTRING(MedicalSettings_enableAdvancedWounds_Description);
typeName = "BOOL";
value = 1;
sliderSettings[] = {0, 25, 1, 1};
};
/* @todo
class GVAR(enableVehicleCrashes) {
@ -98,16 +96,16 @@ class ACE_Settings {
displayName = CSTRING(MedicalSettings_playerDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_playerDamageThreshold_Description);
typeName = "SCALAR";
value = 120;
sliderSettings[] = {0, 1200, 120, 0};
value = 1.0;
sliderSettings[] = {0, 25, 1, 2};
};
class GVAR(AIDamageThreshold) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_AIDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_AIDamageThreshold_Description);
typeName = "SCALAR";
value = -1;
sliderSettings[] = {-1, 25, -1, -1};
value = 1.0;
sliderSettings[] = {0, 25, 1, 2};
};
class GVAR(fatalInjuryCondition) {
category = CSTRING(Category_Medical);
@ -137,6 +135,7 @@ class ACE_Settings {
description = CSTRING(MedicalSettings_cardiacArrestTime_Description);
value = 30;
typeName = "SCALAR";
sliderSettings[] = {1, 3600, 30, 0};
};
class GVAR(medicSetting_PainVisualization) {
category = CSTRING(Category_Medical);
@ -153,7 +152,6 @@ class ACE_Settings {
typeName = "SCALAR";
value = 0;
values[] = {"Anyone", "Medics only", "Doctors only"};
sliderSettings[] = {-1, 3600, 0, 0};
};
class GVAR(medicSetting_Medkit) {
category = CSTRING(Category_Medical);
@ -240,7 +238,8 @@ class ACE_Settings {
displayName = CSTRING(MedicalSettings_remainingDamage_Medkit_DisplayName);
description = CSTRING(MedicalSettings_remainingDamage_Medkit_Description);
typeName = "SCALAR";
value = 0.1;
value = 0.0;
sliderSettings[] = {0, 1, 0.1, 2};
};
class GVAR(allowUnconsciousAnimationOnTreatment) {
category = CSTRING(Category_Medical);
@ -277,7 +276,7 @@ class ACE_Settings {
displayName = CSTRING(MedicalSettings_spontaneousWakeUpChance_DisplayName);
description = CSTRING(MedicalSettings_spontaneousWakeUpChance_Description);
typeName = "SCALAR";
value = 3;
sliderSettings[] = {0, 30, 3, 0};
value = 0.05
sliderSettings[] = {0, 1, 0.05, 2};
};
};

View File

@ -15,19 +15,3 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_Init_EventHandlers {
class CAManBase {
class ADDON {
init = QUOTE(call FUNC(install));
};
};
};
class Extended_Respawn_EventHandlers {
class CAManBase {
class ADDON {
respawn = QUOTE(call FUNC(handleRespawn));
};
};
};

View File

@ -1,6 +0,0 @@
class CfgFactionClasses {
class NO_CATEGORY;
class ADDON: NO_CATEGORY {
displayName = CSTRING(Category_DisplayName);
};
};

View File

@ -1,6 +1,3 @@
class CBA_Extended_EventHandlers;
class CfgVehicles {
class Logic;
class Module_F: Logic {
@ -12,12 +9,10 @@ class CfgVehicles {
scope = 1;
displayName = CSTRING(MedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QUOTE(DFUNC(moduleMedicalSettings));
category = "ACE";
function = QFUNC(moduleMedicalSettings);
functionPriority = 1;
isGlobal = 1;
isSingular = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
@ -470,322 +465,4 @@ class CfgVehicles {
};
};
};
class MapBoard_altis_F;
class ACE_bodyBagObject: MapBoard_altis_F {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};
scope = 1;
scopeCurator = 2;
side = -1;
model = QPATHTOEF(apl,ace_bodybag.p3d);
icon = "";
displayName = CSTRING(Bodybag_Display);
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition)[] = {0,1.2,0};
EGVAR(dragging,dragDirection) = 0;
EGVAR(cargo,size) = 1;
EGVAR(cargo,canLoad) = 1;
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {QPATHTOEF(apl,data\bodybag_co.paa)};
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
distance = 5;
condition = QUOTE(true);
statement = "";
icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
selection = "";
};
};
};
// Medical litter classes
class Thing;
class ACE_MedicalLitterBase: Thing {
scope = 1;
scopeCurator = 0;
displayName = " ";
destrType = "DestructNo";
model = QPATHTOF(data\littergeneric.p3d);
};
class ACE_MedicalLitter_clean: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_clean.p3d);
};
class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages1.p3d);
};
class ACE_MedicalLitter_bandage2: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages2.p3d);
};
class ACE_MedicalLitter_bandage3: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages3.p3d);
};
class ACE_MedicalLitter_packingBandage: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_packingBandage.p3d);
};
class ACE_MedicalLitter_gloves: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_gloves.p3d);
};
class ACE_MedicalLitter_adenosine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_adenosine.p3d);
};
class ACE_MedicalLitter_atropine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_atropine.p3d);
};
class ACE_MedicalLitter_epinephrine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_epinephrine.p3d);
};
class ACE_MedicalLitter_morphine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_morphine.p3d);
};
class ACE_MedicalLitter_QuickClot: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_Quikclot.p3d);
};
class Item_Base_F;
class ACE_fieldDressingItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bandage_Basic_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,1);
};
};
class ACE_packingBandageItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Packing_Bandage_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_packingBandage,1);
};
};
class ACE_elasticBandageItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bandage_Elastic_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_elasticBandage,1);
};
};
class ACE_tourniquetItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Tourniquet_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_tourniquet,1);
};
};
class ACE_morphineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Morphine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_morphine,1);
};
};
class ACE_adenosineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Adenosine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_adenosine,1);
};
};
class ACE_atropineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Atropine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_atropine,1);
};
};
class ACE_epinephrineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Epinephrine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_epinephrine,1);
};
};
class ACE_plasmaIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Plasma_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_plasmaIV,1);
};
};
class ACE_bloodIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Blood_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_bloodIV,1);
};
};
class ACE_salineIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Saline_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_salineIV,1);
};
};
class ACE_quikClotItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(QuikClot_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_quikclot,1);
};
};
class ACE_medKitItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Med_Kit_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_medKit,1);
};
};
class ACE_personalAidKitItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Aid_Kit_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_personalAidKit,1);
};
};
class ACE_surgicalKitItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(SurgicalKit_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_surgicalKit,1);
};
};
class ACE_bodyBagItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bodybag_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_bodyBag,1);
};
};
class ThingX;
class ReammoBox_F: ThingX {
class ACE_Actions;
};
class NATO_Box_Base: ReammoBox_F {
class ACE_Actions: ACE_Actions {
class ACE_MainActions;
};
};
class ACE_medicalSupplyCrate: NATO_Box_Base {
scope = 2;
scopeCurator = 2;
accuracy = 1000;
displayName = CSTRING(medicalSupplyCrate);
model = QPATHTOF(data\ace_medcrate.p3d);
author = ECSTRING(common,ACETeam);
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,50);
MACRO_ADDITEM(ACE_morphine,25);
MACRO_ADDITEM(ACE_epinephrine,25);
MACRO_ADDITEM(ACE_bloodIV,15);
MACRO_ADDITEM(ACE_bloodIV_500,15);
MACRO_ADDITEM(ACE_bloodIV_250,15);
MACRO_ADDITEM(ACE_bodyBag,10);
};
class AnimationSources {
class Cover {
source = "user";
animPeriod = 1.5;
initPhase = 0;
minValue = 0;
maxValue = 1;
};
};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
selection = "cover_action";
class ACE_OpenLid {
displayName = CSTRING(openLid);
condition = QUOTE(alive _target && {_target animationPhase 'Cover' < 0.5});
statement = QUOTE(_target animate ARR_2(['Cover',1]));
showDisabled = 0;
priority = -1;
};
class ACE_CloseLid {
displayName = CSTRING(closeLid);
condition = QUOTE(alive _target && {_target animationPhase 'Cover' >= 0.5});
statement = QUOTE(_target animate ARR_2(['Cover',0]));
showDisabled = 0;
priority = -1;
};
};
};
};
class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate {
displayName = CSTRING(medicalSupplyCrate_advanced);
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,25);
MACRO_ADDITEM(ACE_packingBandage,25);
MACRO_ADDITEM(ACE_elasticBandage,25);
MACRO_ADDITEM(ACE_tourniquet,15);
MACRO_ADDITEM(ACE_morphine,15);
MACRO_ADDITEM(ACE_adenosine,15);
MACRO_ADDITEM(ACE_atropine,15);
MACRO_ADDITEM(ACE_epinephrine,15);
MACRO_ADDITEM(ACE_plasmaIV,7);
MACRO_ADDITEM(ACE_plasmaIV_500,7);
MACRO_ADDITEM(ACE_plasmaIV_250,7);
MACRO_ADDITEM(ACE_salineIV,7);
MACRO_ADDITEM(ACE_salineIV_500,7);
MACRO_ADDITEM(ACE_salineIV_250,7);
MACRO_ADDITEM(ACE_bloodIV,7);
MACRO_ADDITEM(ACE_bloodIV_500,7);
MACRO_ADDITEM(ACE_bloodIV_250,7);
MACRO_ADDITEM(ACE_quikClot,20);
MACRO_ADDITEM(ACE_medKit,20);
MACRO_ADDITEM(ACE_personalAidKit,3);
MACRO_ADDITEM(ACE_surgicalKit,2);
MACRO_ADDITEM(ACE_bodyBag,5);
};
};
};

View File

@ -1,68 +1,6 @@
PREP(addDamageToUnit);
PREP(addStateHandler);
PREP(adjustPainLevel);
PREP(bodyCleanupLoop);
PREP(conditionCardiacArrestTimer);
PREP(conditionExecutionDeath);
PREP(dev_watchMedicalStats);
PREP(displayPatientInformation);
PREP(displayTriageCard);
PREP(enteredStateCardiacArrest);
PREP(enteredStateFatalInjury);
PREP(getBloodLoss);
PREP(getBloodPressure);
PREP(getBloodVolumeChange);
PREP(getCardiacOutput);
PREP(getHeartRateChange);
PREP(getPainLevel);
PREP(getTriageStatus);
PREP(getTypeOfDamage);
PREP(getUnconsciousCondition);
PREP(getUnitState);
PREP(handleBandageOpening);
PREP(handleDamage);
PREP(handleDamage_advanced);
PREP(handleDamage_advancedSetDamage);
PREP(handleDamage_airway);
PREP(handleDamage_caching);
PREP(handleDamage_fractures);
PREP(handleDamage_internalInjuries);
PREP(handleDamage_wounds);
PREP(handleDamage_woundsOld);
PREP(handleIncapacitation);
PREP(handleInit);
PREP(handleKilled);
PREP(handleLocal);
PREP(handleRespawn);
PREP(handleStateDefault);
PREP(handleStateInjured);
PREP(handleStateUnconscious);
PREP(handleUnitVitals);
PREP(handleUnitVitals);
PREP(hasItem);
PREP(hasItems);
PREP(hasMedicalEnabled);
PREP(hasStableVitals);
PREP(hasTourniquetAppliedTo);
PREP(init);
PREP(install);
PREP(isBeingCarried);
PREP(isBeingDragged);
PREP(isInMedicalFacility);
PREP(isInMedicalVehicle);
PREP(isInStableCondition);
PREP(isMedic);
PREP(isMedicalVehicle);
PREP(leftStateCardiacArrest);
PREP(moduleAssignMedicRoles);
PREP(moduleAssignMedicalVehicle);
PREP(moduleMedicalSettings);
PREP(serverRemoveBody);
PREP(setCardiacArrest);
PREP(setDead);
PREP(setUnconscious);
PREP(setUnconsciousStatemachine);
PREP(transitionSecondChance);
PREP(updateHeartRate);
PREP(updatePainSuppress);
PREP(updatePeripheralResistance);

View File

@ -1,33 +1,10 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
["ace_interactMenuClosed", {[objNull, 0] call FUNC(displayPatientInformation);}] call CBA_fnc_addEventHandler;
//Handle Deleting Bodies and creating litter on Server:
if (isServer) then {
["ace_placedInBodyBag", FUNC(serverRemoveBody)] call CBA_fnc_addEventHandler;
};
["ace_unconscious", {
params ["_unit", "_status"];
if (local _unit) then {
if (_status) then {
_unit setVariable ["tf_voiceVolume", 0, true];
_unit setVariable ["tf_unable_to_use_radio", true, true];
_unit setVariable ["acre_sys_core_isDisabled", true, true];
} else {
_unit setVariable ["tf_voiceVolume", 1, true];
_unit setVariable ["tf_unable_to_use_radio", false, true];
_unit setVariable ["acre_sys_core_isDisabled", false, true];
};
};
}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
private _pain = [ACE_player] call FUNC(getPainLevel);
private _pain = GET_PAIN_PERCEIVED(ACE_player);
linearConversion [0, 1, _pain, 1, 5, true];
}] call EFUNC(common,arithmeticSetSource);
@ -53,11 +30,11 @@ if (!hasInterface) exitWith {};
uiNamespace setVariable [QGVAR(debugControl), _ctrl];
[{
private _playerState = [ACE_player, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
private _playerState = [ACE_player, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
(uiNamespace getVariable [QGVAR(debugControl), controlNull]) ctrlSetText format ["Player state: %1", _playerState];
if (!isNull cursorTarget && {cursorTarget isKindOf "CAManBase"}) then {
private _targetState = [cursorTarget, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
private _targetState = [cursorTarget, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
drawIcon3D ["", [0.6, 0, 0, 1], cursorTarget modelToWorldVisual (cursorTarget selectionPosition "pelvis"), 0, 0, 0, format ["State: %1", _targetState], 2, 40 * pixelH, "RobotoCondensed"];
};
}, 0 ,[]] call CBA_fnc_addPerFrameHandler;

View File

@ -6,11 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
GVAR(HITPOINTS) = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
GVAR(STATE_MACHINE) = (configFile >> "ACE_Medical_StateMachine") call CBA_statemachine_fnc_createFromConfig;
/*
[
QGVAR(advancedBandages),

View File

@ -15,17 +15,5 @@ class CfgPatches {
};
#include "ACE_Settings.hpp"
#include "ACE_Medical_StateMachine.hpp"
#include "CfgEden.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "UI\CfgInGameUI.hpp"
#include "UI\RscTitles.hpp"
#include "UI\triagecard.hpp"
class ACE_Extensions {
extensions[] += {"ace_medical"};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,82 +0,0 @@
class StageTI
{
texture="a3\data_f\default_ti_ca.paa";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.050000008,0.050000008,0.050000008,1};
specularPower=50;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="z\ace\addons\medical\data\quikclot_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[]={0,9,0};
up[]={4.5,0,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(0,0,0,0)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage4
{
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage5
{
texture="#(argb,8,8,3)color(1,1,1,1,SMDI)";
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(1.5,1.22)";
uvSource="none";
};
class Stage7
{
texture="a3\data_f\env_land_co.paa";
uvSource="none";
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,32 +0,0 @@
ambient[]={1,1,1,1};
diffuse[]={0.5,0.5,0.5,1};
forcedDiffuse[]={0.5,0.5,0.5,0};
emmisive[]={0,0,0,0};
specular[]={0,0,0,0};
specularPower=0;
PixelShaderID="NormalMapSpecularDIMap";
VertexShaderID="NormalMap";
class Stage1
{
texture="z\ace\addons\medical\data\packingbandage_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};
class Stage2
{
texture= "#(argb,8,8,3)color(0,0,0,1,SMDI)";
uvSource="tex";
class uvTransform
{
aside[]={0,0,0};
up[]={0,0,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};

Binary file not shown.

View File

@ -1,92 +0,0 @@
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.70399898,0.70399898,0.70399898,0};
specularPower=70;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="z\ace\addons\medical\data\surgical_kit_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="#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage5
{
texture="#(argb,8,8,3)color(0,0.05,1,1,SMDI)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage6
{
texture="#(ai,32,128,1)fresnel(0.98,1.02)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage7
{
texture="z\ace\addons\apl\data\env_co.tga";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};

Binary file not shown.

View File

@ -40,15 +40,15 @@ if (!isNull _instigator) then {
};
#ifdef DEBUG_TESTRESULTS
private _startDmg = +(_unit getVariable [QGVAR(bodyPartDamage), [-1]]);
private _startPain = _unit getVariable [QGVAR(pain), 0];
private _startDmg = +(_unit getVariable [QEGVAR(medical,bodyPartDamage), [-1]]);
private _startPain = GET_PAIN(_unit);
#endif
[QEGVAR(medical_engine,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent;
[QEGVAR(medical,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent;
#ifdef DEBUG_TESTRESULTS
private _endDmg = _unit getVariable [QGVAR(bodyPartDamage), [-1]];
private _endPain = _unit getVariable [QGVAR(pain), 0];
private _endDmg = _unit getVariable [QEGVAR(medical,bodyPartDamage), [-1]];
private _endPain = GET_PAIN(_unit);
private _typeOfDamageAdj = _typeOfDamage call EFUNC(medical_damage,getTypeOfDamage);
private _config = configFile >> "ACE_Medical_Injuries" >> "damageTypes" >> _typeOfDamageAdj;
private _selectionSpecific = true;

View File

@ -1,26 +0,0 @@
/*
* Author: Glowbal
* [Description]
*
* Arguments:
* 0: Argument Name <TYPE>
*
* Return Value:
* Return Name <TYPE>
*
* Example:
* ["example"] call ace_[module]_fnc_[functionName]
*
* Public: [Yes/No]
*/
#include "script_component.hpp"
params ["_unit", "_stateMachine"];
if (_unit in GVAR(monitoredUnitsList)) exitWith {}; // already monitored
private _defaultState = _stateMachine getVariable "cba_stateMachine_initialState"; // "Default"
if (!isNil "_defaultState") then {
systemChat format["Assigned default state to: %1. Total monitored: %2", _unit, GVAR(monitoredUnitsList)];
_unit setVariable[QGVAR(state), [-1, _defaultState]];
GVAR(monitoredUnitsList) pushBack _unit;
};

View File

@ -24,8 +24,7 @@ TRACE_2("adjustPainLevel",_unit,_desiredPainLevel);
_desiredPainLevel = _desiredPainLevel * GVAR(painCoefficient);
private _pain = _unit getVariable [QGVAR(pain), 0];
private _pain = GET_PAIN(_unit);
_pain = 0 max (_pain max _desiredPainLevel) min 1;
_unit setVariable [QGVAR(pain), _pain];
_unit setVariable [VAR_PAIN, _pain];

View File

@ -18,12 +18,12 @@
["medical", {
// Hide when patient display is up because they might overlap
if (!isNull EGVAR(medical,displayPatientInformationTarget)) exitWith {""};
if (!isNull EGVAR(medical_gui,displayPatientInformationTarget)) exitWith {""};
private _unit = cursorTarget;
if (!(_unit isKindOf "CAManBase")) then {_unit = cursorObject};
if (!(_unit isKindOf "CAManBase")) then {_unit = ACE_player};
if ((_unit != ACE_player) && {ACE_player getVariable ["ACE_isUnconscious", false]}) then {_unit = ACE_player};
if ((_unit != ACE_player) && {IS_UNCONSCIOUS(ACE_player)}) then {_unit = ACE_player};
if (!(_unit isKindOf "CAManBase")) exitWith {"No Unit?"};
private _return = [];
@ -33,37 +33,37 @@
_return pushBack "";
// State:
private _hasStableVitals = [_unit] call EFUNC(medical,hasStableVitals);
private _targetState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
private _hasStableVitals = [_unit] call EFUNC(medical_status,hasStableVitals);
private _targetState = [_unit, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
if (!local _unit) then {_targetState = "NotLocal";};
private _color = switch (_targetState) do {case "Default": {"33FF33"}; case "Injured": {"FF3333"}; case "Unconscious": {"FF8833"}; case "CardiacArrest": {"FF33AA"}; default {"555555"}};
private _unconcFlag = if (_unit getVariable ["ACE_isUnconscious", false]) then {"[<t color='#FFFFFF'>U</t>]"} else {""};
private _unconcFlag = if IS_UNCONSCIOUS(_unit) then {"[<t color='#FFFFFF'>U</t>]"} else {""};
_return pushBack format ["<t color='#%1'>State: %2</t> [StableVitals: %3] %4", _color, _targetState, _hasStableVitals, _unconcFlag];
// Blood:
private _bloodVolume = _unit getVariable [QEGVAR(medical,bloodVolume), DEFAULT_BLOOD_VOLUME];
private _bloodLoss = [_unit] call EFUNC(medical,getBloodLoss);
private _bloodVolume = GET_BLOOD_VOLUME(_unit);
private _bloodLoss = GET_BLOOD_LOSS(_unit);
private _secondsToHeartstop = if (_bloodLoss != 0) then {format ["[<t color ='#FF9999'>Time Left:</t> %1 sec]", (((_bloodVolume - BLOOD_VOLUME_CLASS_4_HEMORRHAGE) max 0) / _bloodLoss) toFixed 1]} else {""};
_return pushBack format ["Blood: %1", _bloodVolume toFixed 3];
_return pushBack format [" - [Loss: %1] %2", _bloodLoss toFixed 5, _secondsToHeartstop];
// Heart:
private _cardiacOutput = [_unit] call EFUNC(medical,getCardiacOutput);
private _heartRate = _unit getVariable [QEGVAR(medical,heartRate), DEFAULT_HEART_RATE];
([_unit] call EFUNC(medical,getBloodPressure)) params ["_bpLow", "_bpHigh"];
private _cardiacOutput = [_unit] call EFUNC(medical_status,getCardiacOutput);
private _heartRate = GET_HEART_RATE(_unit);
GET_BLOOD_PRESSURE(_unit) params ["_bpLow", "_bpHigh"];
_return pushBack format ["CardiacOutput %1", _cardiacOutput toFixed 5];
_return pushBack format [" - [HR: %1] [BP: %2 / %3]", _heartRate toFixed 1, _bpLow toFixed 1, _bpHigh toFixed 1];
// Pain:
private _pain = _unit getVariable [QEGVAR(medical,pain), 0];
private _painSuppress = _unit getVariable [QEGVAR(medical,painSuppress), 0];
private _painLevel = [_unit] call EFUNC(medical,getPainLevel);
private _pain = GET_PAIN(_unit);
private _painSuppress = GET_PAIN_SUPPRESS(_unit);
private _painLevel = GET_PAIN_PERCEIVED(_unit);
_return pushBack format ["Effective Pain: %1", _painLevel toFixed 3];
_return pushBack format [" - [Pain: %1] [Suppress: %2]", _pain toFixed 3, _painSuppress toFixed 3];
// Damage:
private _damage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]];
private _limping = if (_unit getVariable [QEGVAR(medical_engine,isLimping), false]) then {"[<t color ='#FFCC22'> Limping </t>]"} else {""};
private _limping = if (_unit getVariable [QEGVAR(medical,isLimping), false]) then {"[<t color ='#FFCC22'> Limping </t>]"} else {""};
_return pushBack format ["Damage: [H: %1] [B: %2] %3", (_damage select 0) toFixed 2, (_damage select 1) toFixed 2, _limping];
_return pushBack format ["[LA:%1] [RA: %2] [LL:%3] [RL: %4]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2];
@ -75,7 +75,7 @@
{
private _tPartNum = _forEachIndex;
if (_x != 0) then {
_return pushBack format ["%1 [Time On: %2]", GVAR(SELECTIONS) select _tPartNum, (CBA_missionTime - _x) toFixed 1];
_return pushBack format ["%1 [Time On: %2]", ALL_SELECTIONS select _tPartNum, (CBA_missionTime - _x) toFixed 1];
};
{
_x params ["", "_medClassname", "_medPartNum"];
@ -91,7 +91,7 @@
private _wounds = _unit getVariable [QEGVAR(medical,openWounds), []];
{
_x params ["", "_xClassID", "_xBodyPartN", "_xAmountOf", "_xBleeding", "_xDamage", "_xCategory"];
_return pushBack format ["%1: [%2-%3] [x%4] [Bld: %5] [Dmg: %6]", GVAR(SELECTIONS) select _xBodyPartN, _xClassID, _xCategory, _xAmountOf toFixed 1, _xBleeding toFixed 4, _xDamage toFixed 2];
_return pushBack format ["%1: [%2-%3] [x%4] [Bld: %5] [Dmg: %6]", ALL_SELECTIONS select _xBodyPartN, _xClassID, _xCategory, _xAmountOf toFixed 1, _xBleeding toFixed 4, _xDamage toFixed 2];
} forEach _wounds;
@ -100,7 +100,7 @@
private _ivBags = _unit getVariable [QEGVAR(medical,ivBags), []];
{
_x params ["_xVolumeAdded", "_xType", "_xBodyPartN"];
_return pushBack format ["%1: %2 [%3 ml]", GVAR(SELECTIONS) select _xBodyPartN, _xType, _xVolumeAdded];
_return pushBack format ["%1: %2 [%3 ml]", ALL_SELECTIONS select _xBodyPartN, _xType, _xVolumeAdded];
} forEach _ivBags;
// Footer:

View File

@ -1,20 +0,0 @@
/*
* Author: Ruthberg
* Get the total pain level of a unit.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* ReturnValue:
* Pain level (0 .. 1) <NUMBER>
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
private _pain = _unit getVariable [QGVAR(pain), 0];
private _painSuppress = _unit getVariable [QGVAR(painSuppress), 0];
(0 max (_pain - _painSuppress) min 1)

View File

@ -19,4 +19,4 @@ params ["_unit"];
if (!local _unit) exitWith { ERROR("unit is not local"); };
[_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState
[_unit, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState

View File

@ -1,30 +0,0 @@
/*
* Author: KoffeinFlummi
* Called when a unit is initialized via XEH_init
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleInit
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
_unit setVariable [
QGVAR(HandleDamageEHID),
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]
];
if (local _unit) then {
if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(init), [_unit]];
};
[_unit] call FUNC(init);
};

View File

@ -1,25 +0,0 @@
/*
* Author: Glowbal
* Called when a unit is killed
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleKilled
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
if (!local _unit) exitWith {};
_unit setVariable [QGVAR(pain), 0, true];
_unit setVariable [QGVAR(heartRate), 0, true];
_unit setVariable [QGVAR(bloodPressure), [0, 0], true];

View File

@ -1,29 +0,0 @@
/*
* Author: Glowbal
* Called when a unit switched locality
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Is local <BOOL>
*
* Return Value:
* None
*
* Example:
* [bob, true] call ACE_medical_fnc_handleLocal
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_local"];
if (_local) then {
if ((_unit getVariable ["ACE_isUnconscious",false]) && {count (_unit getVariable [QGVAR(unconsciousArguments), []]) >= 6}) then {
private _arguments = (_unit getVariable [QGVAR(unconsciousArguments), []]);
_arguments set [2, CBA_missionTime];
_unit setVariable [QGVAR(unconsciousArguments), nil, true];
};
};

View File

@ -1,32 +0,0 @@
/*
* Author: KoffeinFlummi
* Called when a unit is Respawned
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleRespawn
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
// reset all variables. @todo GROUP respawn?
[_unit] call FUNC(init);
// Reset captive status for respawning unit
if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
[_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
};
// Remove maximum unconsciousness time handler
_maxUnconHandle = _unit getVariable [QGVAR(maxUnconTimeHandle), -1];
if (_maxUnconHandle > 0) then {
[_maxUnconHandle] call CBA_fnc_removePerFrameHandler;
};

View File

@ -1,21 +0,0 @@
#include "script_component.hpp"
params ["_unit", "_stateName"];
// If the unit died the loop is finished
if (!alive _unit) exitWith {};
// If locality changed, broadcast the last medical state and finish the local loop
if (!local _unit) exitWith {
_unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), DEFAULT_HEART_RATE], true];
_unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true];
_unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), DEFAULT_BLOOD_VOLUME], true];
};
[_unit] call FUNC(handleUnitVitals);
private _painLevel = [_unit] call FUNC(getPainLevel);
if (_painLevel > 0) then {
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound);
};

View File

@ -1,21 +0,0 @@
#include "script_component.hpp"
params ["_unit", "_stateName"];
// If the unit died the loop is finished
if (!alive _unit) exitWith {};
// If locality changed, broadcast the last medical state and finish the local loop
if (!local _unit) exitWith {
_unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), DEFAULT_HEART_RATE], true];
_unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true];
_unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), DEFAULT_BLOOD_VOLUME], true];
};
[_unit] call FUNC(handleUnitVitals);
private _painLevel = [_unit] call FUNC(getPainLevel);
if (_painLevel > 0) then {
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound);
};

View File

@ -1,40 +0,0 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_unit", "_stateName"];
// If the unit died the loop is finished
if (!alive _unit) exitWith {};
// If locality changed, broadcast the last medical state and finish the local loop
if (!local _unit) exitWith {
_unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), DEFAULT_HEART_RATE], true];
_unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true];
_unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), DEFAULT_BLOOD_VOLUME], true];
};
[_unit] call FUNC(handleUnitVitals);
private _painLevel = [_unit] call FUNC(getPainLevel);
if (_painLevel > 0) then {
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound);
};
// Handle spontaneous wakeup from unconsciousness
if (GVAR(spontaneousWakeUpChance) > 0) then {
if (_unit call FUNC(hasStableVitals)) then {
private _lastWakeUpCheck = _unit getVariable [QGVAR(lastWakeUpCheck), CBA_missionTime];
if (CBA_missionTime - _lastWakeUpCheck > SPONTANEOUS_WAKE_UP_INTERVAL) then {
TRACE_2("Checking for wake up",_unit,GVAR(spontaneousWakeUpChance));
_unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime];
if ((random 1) < GVAR(spontaneousWakeUpChance)) then {
TRACE_1("Spontaneous wake up!",_unit);
[QGVAR(WakeUp), _unit] call CBA_fnc_localEvent;
};
};
} else {
// Unstable vitals, procrastinate the next wakeup check
_unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime];
};
};

View File

@ -1,123 +0,0 @@
/*
* Author: Glowbal
* Updates the vitals. Called from the statemachine's onState functions.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleUnitVitals
*
* Example:
* [player] call ace_medical_fnc_handleUnitVitals
*
* Public: No
*/
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_unit"];
private _lastTimeUpdated = _unit getVariable [QGVAR(lastTimeUpdated), 0];
private _deltaT = (CBA_missionTime - _lastTimeUpdated) min 10;
if (_deltaT < 1) exitWith {}; // state machines could be calling this very rapidly depending on number of local units
BEGIN_COUNTER(Vitals);
_unit setVariable [QGVAR(lastTimeUpdated), CBA_missionTime];
private _lastTimeValuesSynced = _unit getVariable [QGVAR(lastMomentValuesSynced), 0];
private _syncValues = (CBA_missionTime - _lastTimeValuesSynced) >= (10 + floor(random(10)));
if (_syncValues) then {
_unit setVariable [QGVAR(lastMomentValuesSynced), CBA_missionTime];
};
private _bloodVolume = (_unit getVariable [QGVAR(bloodVolume), DEFAULT_BLOOD_VOLUME]) + ([_unit, _deltaT, _syncValues] call FUNC(getBloodVolumeChange));
_bloodVolume = 0 max _bloodVolume min DEFAULT_BLOOD_VOLUME;
// @todo: replace this and the rest of the setVariable with EFUNC(common,setApproximateVariablePublic)
_unit setVariable [QGVAR(bloodVolume), _bloodVolume, _syncValues];
// Set variables for synchronizing information across the net
if (_bloodVolume < BLOOD_VOLUME_CLASS_1_HEMORRHAGE) then {
if (_bloodVolume < BLOOD_VOLUME_CLASS_3_HEMORRHAGE) then {
if (_unit getVariable [QGVAR(hasLostBlood), 0] != 2) then {
_unit setVariable [QGVAR(hasLostBlood), 2, true];
};
} else {
if (_unit getVariable [QGVAR(hasLostBlood), 0] != 1) then {
_unit setVariable [QGVAR(hasLostBlood), 1, true];
};
};
} else {
if (_unit getVariable [QGVAR(hasLostBlood), 0] != 0) then {
_unit setVariable [QGVAR(hasLostBlood), 0, true];
};
};
private _bloodLoss = _unit call FUNC(getBloodLoss);
if (_bloodLoss > 0) then {
_unit setVariable [QGVAR(bloodloss), _bloodLoss, _syncValues];
[QGVAR(Injury), _unit] call CBA_fnc_localEvent;
if !(_unit getVariable [QGVAR(isBleeding), false]) then {
_unit setVariable [QGVAR(isBleeding), true, true];
};
} else {
if (_unit getVariable [QGVAR(isBleeding), false]) then {
_unit setVariable [QGVAR(isBleeding), false, true];
};
};
private _painLevel = [_unit] call FUNC(getPainLevel);
if (_painLevel > 0) then {
if !(_unit getVariable [QGVAR(hasPain), false]) then {
_unit setVariable [QGVAR(hasPain), true, true];
};
} else {
if (_unit getVariable [QGVAR(hasPain), false]) then {
_unit setVariable [QGVAR(hasPain), false, true];
};
};
// Handle pain due tourniquets, that have been applied more than 120 s ago
private _tourniquetPain = 0;
private _tourniquets = _unit getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
{
if (_x > 0 && {CBA_missionTime - _x > 120}) then {
_tourniquetPain = _tourniquetPain max (CBA_missionTime - _x - 120) * 0.001;
};
} forEach _tourniquets;
[_unit, _tourniquetPain] call FUNC(adjustPainLevel);
private _heartRate = [_unit, _deltaT, _syncValues] call FUNC(updateHeartRate);
[_unit, _deltaT, _syncValues] call FUNC(updatePainSuppress);
[_unit, _deltaT, _syncValues] call FUNC(updatePeripheralResistance);
private _bloodPressure = [_unit] call FUNC(getBloodPressure);
_unit setVariable [QGVAR(bloodPressure), _bloodPressure, _syncValues];
private _cardiacOutput = [_unit] call FUNC(getCardiacOutput);
if (_bloodLoss > BLOOD_LOSS_KNOCK_OUT_THRESHOLD * _cardiacOutput) then {
[QGVAR(CriticalVitals), _unit] call CBA_fnc_localEvent;
};
#ifdef DEBUG_MODE_FULL
if (!isPlayer _unit) then {
hintSilent format["blood volume: %1, blood loss: [%2, %3]\nhr: %4, bp: %5, pain: %6", round(_bloodVolume * 100) / 100, round(_bloodLoss * 1000) / 1000, round((_bloodLoss / (0.001 max _cardiacOutput)) * 100) / 100, round(_heartRate), _bloodPressure, round(_painLevel * 100) / 100];
};
#endif
_bloodPressure params ["_bloodPressureL", "_bloodPressureH"];
if (_bloodPressureL < 40 || {_heartRate < 30}) then {
[QGVAR(CriticalVitals), _unit] call CBA_fnc_localEvent;
};
if ((_heartRate < 20) || {_heartRate > 220} || {_bloodPressureH < 50}) then {
[QGVAR(FatalVitals), _unit] call CBA_fnc_localEvent;
};
END_COUNTER(Vitals);

View File

@ -1,85 +0,0 @@
/*
* Author: KoffeinFlummi, commy2
* Initializes unit variables.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_init
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
if (damage _unit > 0) then {
_unit setDamage 0;
};
_unit setVariable [QGVAR(pain), 0, true];
_unit setVariable [QGVAR(bloodVolume), DEFAULT_BLOOD_VOLUME, true];
_unit setVariable ["ACE_isUnconscious", false, true];
_unit setVariable [QGVAR(partialHealCounter), 0, true];
// tourniquets
_unit setVariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
_unit setVariable [QGVAR(occludedMedications), nil, true]; //Delayed Medications (from tourniquets)
// wounds and injuries
_unit setVariable [QGVAR(openWounds), [], true];
_unit setVariable [QGVAR(bandagedWounds), [], true];
_unit setVariable [QGVAR(stitchedWounds), [], true];
_unit setVariable [QEGVAR(medical_engine,isLimping), false, true];
// vitals
_unit setVariable [QGVAR(heartRate), DEFAULT_HEART_RATE, true];
_unit setVariable [QGVAR(heartRateAdjustments), [], true];
_unit setVariable [QGVAR(bloodPressure), [80, 120], true];
_unit setVariable [QGVAR(peripheralResistance), 100, true];
_unit setVariable [QGVAR(peripheralResistanceAdjustments), [], true];
// triage card and logs
_unit setVariable [QGVAR(triageLevel), 0, true];
_unit setVariable [QGVAR(triageCard), [], true];
// IVs
_unit setVariable [QGVAR(ivBags), nil, true];
// damage storage
_unit setVariable [QGVAR(bodyPartDamage), [0,0,0,0,0,0], true];
#ifdef DEBUG_TESTRESULTS
_unit setVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
#endif
// generic medical admin
_unit setVariable [QGVAR(inCardiacArrest), false, true];
_unit setVariable [QGVAR(hasLostBlood), 0, true];
_unit setVariable [QGVAR(isBleeding), false, true];
_unit setVariable [QGVAR(hasPain), false, true];
_unit setVariable [QGVAR(painSuppress), 0, true];
_unit setVariable [QGVAR(painSuppressAdjustments), [], true];
// medication
private _allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []];
{
_unit setVariable [_x select 0, nil];
} forEach _allUsedMedication;
_unit setVariable [QGVAR(allUsedMedication), [], true];
// TODO move to treatment
private _logs = _unit getVariable [QGVAR(allLogs), []];
{
_unit setVariable [_x, nil];
} forEach _logs;
_unit setVariable [QGVAR(allLogs), [], true];
[{
params ["_unit"];
TRACE_2("Unit Init",_unit,local _unit);
[QGVAR(initialized), [_unit]] call CBA_fnc_localEvent;
}, [_unit], 0.5] call CBA_fnc_waitAndExecute;

View File

@ -1,10 +0,0 @@
#include "script_component.hpp"
params ["_unit"];
if (local _unit) then {
if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(init), [_unit]];
};
[_unit] call FUNC(init);
};

View File

@ -1,28 +0,0 @@
/*
* Author: Glowbal
* Assign a medical role to a unit.
*
* Arguments:
* 0: The module logic <OBJECT>
* 1: Synchronized units <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* None
*
* Example:
* [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleAssignMedicRoles
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic"];
if (!isNull _logic) then {
private _list = _logic getVariable ["EnableList", ""];
private _setting = _logic getVariable ["role", 0];
[_list, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList);
[synchronizedObjects _logic, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList);
};

View File

@ -1,28 +0,0 @@
/*
* Author: Glowbal
* Assign vehicle as a medical vehicle.
*
* Arguments:
* 0: The module logic <OBJECT>
* 1: Synchronized units <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* None
*
* Example:
* [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleAssignMedicalVehicle
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic"];
if (!isNull _logic) then {
private _list = _logic getVariable ["EnableList", ""];
private _setting = _logic getVariable ["enabled", 0];
[_list, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList);
[synchronizedObjects _logic, QGVAR(medicClass), _setting, true, true] call EFUNC(common,assignObjectsInList);
};

View File

@ -13,8 +13,8 @@
* Success? <BOOLEAN>
*
* Example:
* [bob, true] call ace_medical_fnc_setUnconscious;
* [player, true, 5, true] call ace_medical_fnc_setUnconscious;
* [bob, true] call ace_medical_status__fnc_setUnconscious;
* [player, true, 5, true] call ace_medical_status_fnc_setUnconscious;
*
* Public: yes
*/
@ -34,15 +34,15 @@ if ((isNull _unit) || {!alive _unit} || {!(_unit isKindOf "CAManBase")}) exitWit
false
};
if (!local _unit) exitWith {
[QGVAR(setUnconscious), [_unit, _knockOut], _unit] call CBA_fnc_targetEvent;
[QEGVAR(medical,setUnconscious), [_unit, _knockOut], _unit] call CBA_fnc_targetEvent;
true
};
if (_knockOut isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {
if (_knockOut isEqualTo IS_UNCONSCIOUS(_unit)) exitWith {
WARNING_2("setUnconscious called with no change [Unit %1] [State [%2]", _unit, _knockOut);
false
};
private _beforeState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
private _beforeState = [_unit, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
if (_knockOut) then {
@ -59,17 +59,14 @@ if (_knockOut) then {
};
}, [_unit], _minWaitingTime] call CBA_fnc_waitAndExecute;
};
if (GVAR(spontaneousWakeUpChance) > 0) then {
_unit setVariable [QGVAR(lastWakeUpCheck), CBA_missionTime + _minWaitingTime - SPONTANEOUS_WAKE_UP_INTERVAL];
if (EGVAR(medical,spontaneousWakeUpChance) > 0) then {
_unit setVariable [QEGVAR(medical,lastWakeUpCheck), CBA_missionTime + _minWaitingTime - SPONTANEOUS_WAKE_UP_INTERVAL];
};
};
[QGVAR(knockOut), _unit] call CBA_fnc_localEvent;
} else {
[QGVAR(WakeUp), _unit] call CBA_fnc_localEvent;
};
private _afterState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
TRACE_2("state change",_beforeState,_afterState);
true

View File

@ -1,146 +0,0 @@
/*
* Author: Glowbal
* PFH logic for unconscious state
*
* Arguments:
* 0: PFEH - <ARRAY>
* 0: The unit that will be put in an unconscious state <OBJECT>
* 1: unitPos (stance) <STRING>
* 2: Starting Time <NUMBER>
* 3: Minimum Waiting Time <NUMBER>
* 4: Has Moved Out <BOOL>
* 5: Parachute Check <BOOL>
* 1: PFEH ID <NUMBER>
*
* Return Value:
* None
*
* Example:
* [[unit,"pos", 5, 5, true, false], 5], "classname"] call ace_medical_fnc_unconsciousPFH
*
* Public: yes
*/
#include "script_component.hpp"
params ["_args", "_idPFH"];
_args params ["_unit", "_originalPos", "_startingTime", "_minWaitingTime", "_hasMovedOut", "_parachuteCheck"];
TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _originalPos, _startingTime, _minWaitingTime, _hasMovedOut, _parachuteCheck);
if (!alive _unit) exitWith {
if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then {
TRACE_1("Removing fake weapon [on death]",_unit);
_unit removeWeapon "ACE_FakePrimaryWeapon";
};
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
};
[_unit, "setHidden", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
[_unit, false] call EFUNC(common,disableAI);
//_unit setUnitPos _originalPos;
[_unit, "isUnconscious"] call EFUNC(common,unmuteUnit);
["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent;
TRACE_3("ACE_DEBUG_Unconscious_Exit",_unit, (!alive _unit) , "ace_unconscious");
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith {
TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getVariable QGVAR(unconsciousArguments),animationState _unit);
// TODO, handle this with carry instead, so we can remove the PFH here.
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then {
if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then {
TRACE_1("Removing fake weapon [on wakeup]",_unit);
_unit removeWeapon "ACE_FakePrimaryWeapon";
};
if (vehicle _unit == _unit) then {
if (animationState _unit == "AinjPpneMstpSnonWrflDnon") then {
[_unit,"AinjPpneMstpSnonWrflDnon_rolltofront", 2] call EFUNC(common,doAnimation);
[_unit,"amovppnemstpsnonwnondnon", 1] call EFUNC(common,doAnimation);
} else {
[_unit,"amovppnemstpsnonwnondnon", 2] call EFUNC(common,doAnimation);
};
} else {
private _vehicle = vehicle _unit;
private _oldVehicleAnimation = _unit getVariable [QGVAR(vehicleAwakeAnim), []];
private _awakeInVehicleAnimation = "";
if (((count _oldVehicleAnimation) > 0) && {(_oldVehicleAnimation select 0) == _vehicle}) then {
_awakeInVehicleAnimation = _oldVehicleAnimation select 1;
};
//Make sure we have a valid, non-terminal animation:
if ((_awakeInVehicleAnimation != "") && {(getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> _awakeInVehicleAnimation >> "terminal")) == 0}) then {
[_unit, _awakeInVehicleAnimation, 2] call EFUNC(common,doAnimation);
} else {
//Don't have a valid animation saved, reset the unit animation with a moveInXXX
TRACE_1("No Valid Animation, doing seat reset", _awakeInVehicleAnimation);
private _slotInfo = [];
{if ((_x select 0) == _unit) exitWith {_slotInfo = _x;};} forEach (fullCrew _vehicle);
if (_slotInfo isEqualTo []) exitWith {ERROR("No _slotInfo?");};
//Move the unit out:
_unit setPosASL ((getPosASL _unit) vectorAdd [0,0,100]);
//Move the unit back into old seat:
if ((_slotInfo select 1) == "driver") then {
_unit moveInDriver _vehicle;
} else {
if ((_slotInfo select 1) == "cargo") then {
_unit moveInCargo [_vehicle, (_slotInfo select 2)];
} else {
_unit moveInTurret [_vehicle, (_slotInfo select 3)];
};
};
};
};
_unit setVariable [QGVAR(vehicleAwakeAnim), nil];
["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent;
// EXIT PFH
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
if (!_hasMovedOut) then {
// Reset the unit back to the previous captive state.
[_unit, "setHidden", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
// Swhich the unit back to its original group
//Unconscious units shouldn't be put in another group #527:
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
};
[_unit, false] call EFUNC(common,disableAI);
_unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP)
_unit setUnconscious false;
[_unit, "isUnconscious"] call EFUNC(common,unmuteUnit);
// ensure this statement runs only once
_args set [4, true];
};
};
if (_parachuteCheck) then {
if !(vehicle _unit isKindOf "ParachuteBase") then {
[_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation);
_args set [5, false];
};
};
if (!local _unit) exitWith {
TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getVariable QGVAR(unconsciousArguments));
_args set [3, _minWaitingTime - (CBA_missionTime - _startingTime)];
_unit setVariable [QGVAR(unconsciousArguments), _args, true];
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs
if ((CBA_missionTime - _startingTime) >= _minWaitingTime) exitWith {
TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition));
if (!([_unit] call FUNC(getUnconsciousCondition))) then {
_unit setVariable ["ACE_isUnconscious", false, true];
};
};

View File

@ -15,4 +15,4 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\medical\script_macros_medical.hpp"
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"

View File

@ -1,58 +0,0 @@
#define ALL_BODY_PARTS ["head", "body", "leftarm", "rightarm", "leftleg", "rightleg"]
#define MEDICAL_ACTION_DISTANCE 1.75
// scale received pain to 0-2 level to select type of scream
// below 0.25: 0, from 0.25 to 0.5: 1, more than 0.5: 2
#define PAIN_TO_SCREAM(pain) (floor (4 * pain) min 2)
// scale received pain to 0-2 level to select type of scream
// below 0.33: 0, from 0.34 to 0.66: 1, more than 0.67: 2
#define PAIN_TO_MOAN(pain) (floor (3 * pain) min 2)
#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default})
#define GET_STRING(config,default) (if (isText (config)) then {getText (config)} else {default})
#define GET_ARRAY(config,default) (if (isArray (config)) then {getArray (config)} else {default})
#define DEFAULT_HEART_RATE 80
// --- blood
// 0.077 l/kg * 80kg = 6.16l
#define DEFAULT_BLOOD_VOLUME 6.0 // in liters
#define BLOOD_VOLUME_CLASS_1_HEMORRHAGE 6.000 // lost less than 15% blood, Class I Hemorrhage
#define BLOOD_VOLUME_CLASS_2_HEMORRHAGE 5.100 // lost more than 15% blood, Class II Hemorrhage
#define BLOOD_VOLUME_CLASS_3_HEMORRHAGE 4.200 // lost more than 30% blood, Class III Hemorrhage
#define BLOOD_VOLUME_CLASS_4_HEMORRHAGE 3.600 // lost more than 40% blood, Class IV Hemorrhage
// IV Change per second calculation:
// 250 ml should take 60 seconds to fill. 250 ml / 60 s ~ 4.1667 ml/s.
#define IV_CHANGE_PER_SECOND 4.1667 // in milliliters per second
// Minimum amount of damage required for penetrating wounds (also minDamage for velocity wounds)
#define PENETRATION_THRESHOLD 0.35
// To be replaced by a proper blood pressure calculation
#define BLOOD_LOSS_KNOCK_OUT_THRESHOLD 0.5 // 50% of cardiac output
// --- pain
#define PAIN_UNCONSCIOUS 0.5
// Pain fade out time (time it takes until pain is guaranteed to be completly gone)
#define PAIN_FADE_TIME 900
// Only relevant when advanced medication is disabled
// Morphine pain suppression fade out time (time it takes until pain suppression is guaranteed to be completly gone)
#define PAIN_SUPPRESSION_FADE_TIME 1800
// Chance to wake up when vitals are stable (checked once every SPONTANEOUS_WAKE_UP_INTERVAL seconds)
#define SPONTANEOUS_WAKE_UP_INTERVAL 15
#define LETHAL_HEAD_DAMAGE_THRESHOLD 1.0
// Minimum leg damage required for limping
#define LIMPING_DAMAGE_THRESHOLD 0.30
// Minimum body part damage required for blood effect on uniform
#define VISUAL_BODY_DAMAGE_THRESHOLD 0.35

File diff suppressed because it is too large Load Diff

View File

@ -1,129 +0,0 @@
class ACE_gui_backgroundBase;
class ACE_gui_listBoxBase;
class Rsctitles {
class GVAR(DisplayInformation) {
duration = 10e10;
idd = 1111;
movingenable = 0;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(DisplayInformation))), _this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(DisplayInformation))), nil)]);
class controlsBackground {
class bodyImgBackground: ACE_gui_backgroundBase {
idc = -1;
x = "safezoneX + (2.5 * (((safezoneW / safezoneH) min 1.2) / 40))";
y = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
w = "8.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "8.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
colorBackground[] = {1,1,1,1};
colorPicture[] = {1,1,1,1};
colorText[] = {1,1,1,1};
text = QPATHTOF(ui\body_background.paa);
};
class bodyImgHead: bodyImgBackground {
idc = 50;
colorBackground[] = {1,1,1,1};
colorPicture[] = {1,1,1,1};
colorText[] = {1,1,1,1};
text = QPATHTOF(ui\body_head.paa);
};
class bodyImgTorso: bodyImgHead {
idc = 51;
text = QPATHTOF(ui\body_torso.paa);
};
class bodyImgArms_l: bodyImgHead {
idc = 52;
text = QPATHTOF(ui\body_arm_left.paa);
};
class bodyImgArms_r: bodyImgHead {
idc = 53;
text = QPATHTOF(ui\body_arm_right.paa);
};
class bodyImgLegs_l: bodyImgHead {
idc = 54;
text = QPATHTOF(ui\body_leg_left.paa);
};
class bodyImgLegs_r: bodyImgHead {
idc = 55;
text = QPATHTOF(ui\body_leg_right.paa);
};
class InjuryListLabel {
idc = 199;
type = CT_STATIC;
x = "safezoneX + (2 * (((safezoneW / safezoneH) min 1.2) / 40))";
y = "10.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
w = "9 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW
font = "RobotoCondensed";
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
text = CSTRING(Injuries);
};
class InjuryList: ACE_gui_listBoxBase {
idc = 200;
x = "safezoneX + (2 * (((safezoneW / safezoneH) min 1.2) / 40))";
y = "11 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
w = "9 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
rowHeight = 0.03;
colorBackground[] = {0, 0, 0, 0.2};
colorText[] = {1,1, 1, 1.0};
colorScrollbar[] = {0.95, 0.95, 0.95, 1};
colorSelect[] = {0.95, 0.95, 0.95, 1};
colorSelect2[] = {0.95, 0.95, 0.95, 1};
colorSelectBackground[] = {0, 0, 0, 0.0};
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.5};
};
class ActivityLog: InjuryList {
idc = 302;
y = "21.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
h = "7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
rowHeight = 0.03;
shadow = 2;
colorBackground[] = {0, 0, 0, 0};
colorText[] = {1,1, 1, 1.0};
colorScrollbar[] = {0.95, 0.95, 0.95, 1};
colorSelect[] = {1,1,1,1};
colorSelect2[] = {1,1,1,1};
colorSelectBackground[] = {0, 0, 0, 0.0};
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0};
};
class TriageStatus {
idc = 303;
type = CT_STATIC;
x = "safezoneX + (2 * (((safezoneW / safezoneH) min 1.2) / 40))";
y = "20.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
w = "9 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW
font = "RobotoCondensed";
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {0,0,0,0.9};
text = "";
};
};
};
// disables blood texture overlay
class RscHealthTextures {
class controls {
class Flame_1;
class Blood_1: Flame_1 {
text = ""; //"A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_lower_ca.paa";
};
class Blood_2: Flame_1 {
text = ""; //"A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_middle_ca.paa";
};
class Blood_3: Flame_1 {
text = ""; //"A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_upper_ca.paa";
};
};
};
};

View File

@ -5,7 +5,7 @@ class GVAR(stateMachine) {
class Initial {
class Injured {
targetState = "Injured";
condition = QUOTE(call FUNC(isInjured));
condition = QFUNC(isInjured);
};
class HealUnit {
targetState = "HealUnit";
@ -20,7 +20,7 @@ class GVAR(stateMachine) {
class InSafety {
targetState = "Safe";
condition = QUOTE(call FUNC(isSafe));
condition = QFUNC(isSafe);
};
};
@ -31,8 +31,8 @@ class GVAR(stateMachine) {
class RequestMedic {
targetState = "HealSelf";
condition = QUOTE(call FUNC(canRequestMedic));
onTransition = QUOTE(call FUNC(requestMedic));
condition = QFUNC(canRequestMedic);
onTransition = QFUNC(requestMedic);
};
class HealSelf {
targetState = "HealSelf";
@ -41,7 +41,7 @@ class GVAR(stateMachine) {
};
class HealSelf {
onState = QUOTE(call FUNC(healSelf));
onState = QFUNC(healSelf);
onStateLeaving = QUOTE(_this setVariable [ARR_2(QUOTE(QGVAR(treatmentOverAt)),nil)]);
class Initial {
@ -63,7 +63,7 @@ class GVAR(stateMachine) {
};
class HealUnit {
onState = QUOTE(call FUNC(healUnit));
onState = QFUNC(healUnit);
onStateLeaving = QUOTE(_this setVariable [ARR_2(QUOTE(QGVAR(treatmentOverAt)),nil)]);
class Initial {

View File

@ -4,7 +4,7 @@
TRACE_1("settingsInitialized", GVAR(enabledFor));
if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled
if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients
// Only run for AI that does not have to deal with advanced medical
if (EGVAR(medical,enableFor) == 1 || {hasInterface}) exitWith {};
@ -19,7 +19,7 @@
private _medic = objNull;
{
if ((!isPlayer _x) && {[_x] call EFUNC(medical,isMedic)}) exitWith {
if ((!isPlayer _x) && {[_x] call EFUNC(medical_treatment,isMedic)}) exitWith {
_medic = _x;
};
} forEach (units _unit);

View File

@ -6,7 +6,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_medical"};
requiredAddons[] = {"ace_medical_treatment"};
author = ECSTRING(common,ACETeam);
authors[] = {"BaerMitUmlaut"};
url = ECSTRING(main,URL);

View File

@ -19,10 +19,10 @@
// we ignore this here. We need to "notice" the medic that he should
// treat other units, or else he won't do anything on his own.
if ([_this] call EFUNC(medical,isMedic) || {vehicle _this != _this}) exitWith {false};
if ([_this] call EFUNC(medical_treatment,isMedic) || {vehicle _this != _this}) exitWith {false};
{
if ([_x] call EFUNC(medical,isMedic) && {!([_x] call EFUNC(common,isPlayer))}) exitWith {
if ([_x] call EFUNC(medical_treatment,isMedic) && {!([_x] call EFUNC(common,isPlayer))}) exitWith {
_this setVariable [QGVAR(assignedMedic), _x];
true
};

View File

@ -18,12 +18,12 @@
// Player will have to do this manually of course
if ([_this] call EFUNC(common,isPlayer)) exitWith {};
// Can't heal self when unconscious
if (_this getVariable ["ACE_isUnconscious", false]) exitWith {};
if IS_UNCONSCIOUS(_this) exitWith {};
// Check if we're still treating
if ((_this getVariable [QGVAR(treatmentOverAt), CBA_missionTime]) > CBA_missionTime) exitWith {};
private _needsBandaging = ([_this] call EFUNC(medical,getBloodLoss)) > 0;
private _needsMorphine = (_this getVariable [QEGVAR(medical,pain), 0]) > 0.2;
private _needsBandaging = GET_BLOOD_LOSS(_this) > 0;
private _needsMorphine = GET_PAIN(_this) > 0.2;
switch (true) do {
case _needsBandaging: {

View File

@ -16,7 +16,7 @@
#include "script_component.hpp"
// Can't heal other units when unconscious
if (_this getVariable ["ACE_isUnconscious", false]) exitWith {};
if IS_UNCONSCIOUS(_this) exitWith {};
// Check if we're still treating
if ((_this getVariable [QGVAR(treatmentOverAt), CBA_missionTime]) > CBA_missionTime) exitWith {};
@ -52,9 +52,9 @@ _this setVariable [QGVAR(movingToInjured), false];
_this forceSpeed 0;
_target forceSpeed 0;
private _needsBandaging = ([_target] call EFUNC(medical,getBloodLoss)) > 0;
private _needsMorphine = (_target getVariable [QEGVAR(medical,pain), 0]) > 0.2;
private _needsEpinephrine = _target getVariable ["ACE_isUnconscious", false];
private _needsBandaging = GET_BLOOD_LOSS(_target) > 0;
private _needsMorphine = GET_PAIN(_target) > 0.2;
private _needsEpinephrine = IS_UNCONSCIOUS(_target);
switch (true) do {
case _needsBandaging: {

View File

@ -17,8 +17,8 @@
if !(alive _this) exitWith {false};
private _bloodLoss = [_this] call EFUNC(medical,getBloodLoss);
private _pain = [_this] call EFUNC(medical,getPainLevel);
private _unconscious = _this getVariable ["ACE_isUnconscious", false];
private _bloodLoss = GET_BLOOD_LOSS(_this);
private _pain = GET_PAIN_PERCEIVED(_this);
private _unconscious = IS_UNCONSCIOUS(_this);
(_bloodLoss > 0) || {_pain > 0.2} || _unconscious

View File

@ -15,4 +15,4 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\medical\script_macros_medical.hpp"
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"

View File

@ -38,5 +38,5 @@ if (isServer) then {
private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create;
[_stateMachine, {call FUNC(onBleeding)}, {}, {}, "Bleeding"] call CBA_statemachine_fnc_addState;
[QEGVAR(medical_engine,woundReceived), FUNC(handleWoundReceived)] call CBA_fnc_addEventHandler;
[QEGVAR(medical,woundReceived), FUNC(handleWoundReceived)] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;

View File

@ -6,7 +6,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main"};
requiredAddons[] = {"ace_medical_status"};
author = ECSTRING(common,ACETeam);
authors[] = {"Glowbal","Sickboy","commy2"};
url = ECSTRING(main,URL);

View File

@ -18,6 +18,7 @@
params ["_unit"];
if (GVAR(useAceMedical)) exitWith {
_unit getVariable [QEGVAR(medical,isBleeding), false];
IS_BLEEDING(_unit)
};
alive _unit && {getDammage _unit > 0.3};
alive _unit && {getDammage _unit > 0.3}

View File

@ -20,7 +20,7 @@ params ["_unit"];
if (((vehicle _unit) != _unit) && {!((vehicle _unit) isKindOf "StaticWeapon")}) exitWith {}; // Don't bleed on ground if mounted
private _lastTime = _unit getVariable [QGVAR(lastTime), -10];
private _bloodLoss = (if (GVAR(useAceMedical)) then {([_unit] call EFUNC(medical,getBloodLoss)) * 2.5} else {getDammage _unit * 2}) min 6;
private _bloodLoss = (if (GVAR(useAceMedical)) then {GET_BLOOD_LOSS(_unit) * 2.5} else {getDammage _unit * 2}) min 6;
TRACE_1("",_bloodLoss);
if ((CBA_missionTime - _lastTime) + _bloodLoss >= 8 + random 2) then {

View File

@ -15,7 +15,6 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\medical\script_macros_medical.hpp"
#define MAX_BLOOD_OBJECTS 500
#define BLOOD_OBJECT_LIFETIME 900

View File

@ -1,5 +1,5 @@
PREP(getTypeOfDamage);
PREP(handleIncapacitation);
PREP(parseConfigForInjuries);
PREP(woundsHandler);
PREP(woundsHandlerSQF);

View File

@ -14,21 +14,18 @@ addMissionEventHandler ["Loaded",{
call FUNC(parseConfigForInjuries);
}];
// decide which woundsHandler to use by whether the extension is present or not
// decide which woundsHandler to use by whether the extension is present or not
if ("ace_medical" callExtension "version" != "") then {
DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandler);
} else {
DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandlerSQF);
};
[QEGVAR(medical_engine,woundReceived), {
[QEGVAR(medical,woundReceived), {
params ["_unit", "_woundedHitPoint", "_receivedDamage", "", "_ammo"];
private _typeOfDamage = _ammo call FUNC(getTypeOfDamage);
[_unit, _woundedHitPoint, _receivedDamage, _typeOfDamage] call FUNC(woundsHandlerActive);
// Disable for now:
// [_unit, EGVAR(medical,STATE_MACHINE)] call EFUNC(medical,addStateHandler);
}] call CBA_fnc_addEventHandler;
ADDON = true;

View File

@ -6,7 +6,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_medical"};
requiredAddons[] = {"ace_medical_engine"};
author = ECSTRING(common,ACETeam);
authors[] = {""};
url = ECSTRING(main,URL);
@ -15,5 +15,8 @@ class CfgPatches {
};
#include "ACE_Medical_Injuries.hpp"
#include "CfgEventHandlers.hpp"
class ACE_Extensions {
extensions[] += {"ace_medical"};
};

View File

@ -14,8 +14,8 @@
params ["_unit"];
private _painLevel = [_unit] call FUNC(getPainLevel);
private _bodyPartDamage = _unit getVariable [QGVAR(bodyPartDamage), [0,0,0,0,0,0]];
private _painLevel = GET_PAIN_PERCEIVED(_unit);
private _bodyPartDamage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]];
_bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightArmDamage", "_leftLegDamage", "_rightLegDamage"];
@ -25,14 +25,14 @@ _bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightA
if (_bodyPartN == 1 && {_damage < PENETRATION_THRESHOLD}) then {
_bodyDamage = _bodyDamage - (_amountOf * _damage);
};
} forEach (_unit getVariable [QGVAR(openWounds), []]);
} forEach (_unit getVariable [QEGVAR(medical,openWounds), []]);
private _damageThreshold = if (isPlayer _unit) then {
GVAR(playerDamageThreshold)
EGVAR(medical,playerDamageThreshold)
} else {
GVAR(AIDamageThreshold)
EGVAR(medical,AIDamageThreshold)
};
if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < 0.1}}) then {
[QGVAR(CriticalInjury), _unit] call CBA_fnc_localEvent;
[QEGVAR(medical,CriticalInjury), _unit] call CBA_fnc_localEvent;
};

View File

@ -24,7 +24,7 @@ if (_typeOfDamage isEqualTo "") then {
// Administration for open wounds and ids
private _openWounds = _unit getVariable [QEGVAR(medical,openWounds), []];
private _woundID = _unit getVariable [QGVAR(lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array
private _woundID = _unit getVariable [QEGVAR(medical,lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array
TRACE_4("extension call",_bodyPart,_damage,_typeOfDamage,_woundID);
private _extensionOutput = "ace_medical" callExtension format ["HandleDamageWounds,%1,%2,%3,%4", _bodyPart, _damage, _typeOfDamage, _woundID];
@ -75,6 +75,7 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra
#endif
if (_bodyPartNToAdd == 0 && {_woundDamage > LETHAL_HEAD_DAMAGE_THRESHOLD}) then {
TRACE_2("FatalInjury",_unit,_woundDamage);
[QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent;
};
@ -112,10 +113,10 @@ _unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true];
_bodyPartVisParams call EFUNC(medical_engine,updateBodyPartVisuals);
[_unit, _painLevel] call EFUNC(medical,adjustPainLevel);
[_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call EFUNC(medical_engine,playInjuredSound);
[QGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent;
if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then {
[_unit] call EFUNC(medical,handleIncapacitation);
[_unit] call FUNC(handleIncapacitation);
};
TRACE_5("exit",_unit,_painLevel,_unit getVariable QEGVAR(medical,pain),_unit getVariable QEGVAR(medical,openWounds),_woundsCreated);
TRACE_5("exit",_unit,_painLevel,GET_PAIN(_unit),_unit getVariable QEGVAR(medical,openWounds),_woundsCreated);

View File

@ -69,7 +69,7 @@ if (_highestPossibleSpot < 0) exitWith {};
// Administration for open wounds and ids
private _openWounds = _unit getVariable [QEGVAR(medical,openWounds), []];
private _woundID = _unit getVariable [QGVAR(lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array
private _woundID = _unit getVariable [QEGVAR(medical,lastUniqueWoundID), 1]; // Unique wound ids are not used anywhere: ToDo Remove from openWounds array
private _painLevel = 0;
private _critialDamage = false;
@ -91,10 +91,10 @@ private _woundsCreated = [];
_oldInjury params ["_woundClassIDToAdd", "", "_injuryBleedingRate", "_injuryPain"];
private _bodyPartNToAdd = [floor random 6, _bodyPartN] select _isSelectionSpecific; // 6 == count ALL_BODY_PARTS
_bodyPartDamage set [_bodyPartNToAdd, (_bodyPartDamage select _bodyPartNToAdd) + _woundDamage];
_bodyPartVisParams set [[1,2,3,3,4,4] select _bodyPartNToAdd, true]; // Mark the body part index needs updating
// Create a new injury. Format [ID, classID, bodypart, percentage treated, bleeding rate]
_injury = [_woundID, _woundClassIDToAdd, _bodyPartNToAdd, 1, _injuryBleedingRate];
@ -125,6 +125,7 @@ private _woundsCreated = [];
#endif
if (_bodyPartNToAdd == 0 && {_woundDamage > LETHAL_HEAD_DAMAGE_THRESHOLD}) then {
TRACE_2("FatalInjury",_unit,_woundDamage);
[QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent;
};
@ -170,10 +171,10 @@ _unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true];
_bodyPartVisParams call EFUNC(medical_engine,updateBodyPartVisuals);
[_unit, _painLevel] call EFUNC(medical,adjustPainLevel);
[_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call EFUNC(medical_engine,playInjuredSound);
[QGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent;
if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then {
[_unit] call EFUNC(medical,handleIncapacitation);
[_unit] call FUNC(handleIncapacitation);
};
TRACE_5("exit",_unit,_painLevel,_unit getVariable QEGVAR(medical,pain),_unit getVariable QEGVAR(medical,openWounds),_woundsCreated);
TRACE_5("exit",_unit,_painLevel,GET_PAIN(_unit),_unit getVariable QEGVAR(medical,openWounds),_woundsCreated);

View File

@ -15,4 +15,4 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\medical\script_macros_medical.hpp"
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"

View File

@ -2,63 +2,6 @@
class CfgVehicles {
class Man;
class CAManBase: Man {
// Delete base game sounds.
// These are never played for ai and remote players.
#ifdef DISABLE_VANILLA_SCREAMS
class SoundHitScream {
person1[] = {{"Male08ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person2[] = {{"Male06ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person3[] = {{"Male09ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person4[] = {{"Male07ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person5[] = {{"Male03GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person6[] = {{"Male02ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person7[] = {{"Male01ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person8[] = {{"Male01GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person9[] = {{"Male02ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person10[] = {{"Male02GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person11[] = {{"Male03ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person12[] = {{"Male03ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person13[] = {{"Male04ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person14[] = {{"Male05GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person15[] = {{"Male06GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person16[] = {{"Male04GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person17[] = {{"Male05ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person18[] = {{"Male05ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
};
#endif
#ifdef DISABLE_VANILLA_MOANS
class SoundInjured {
person_moan1[] = {{"Male08ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan2[] = {{"Male06ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan3[] = {{"Male09ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan4[] = {{"Male07ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan5[] = {{"Male03GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan6[] = {{"Male02ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan7[] = {{"Male01ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan8[] = {{"Male01GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan9[] = {{"Male02ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan10[] = {{"Male02GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan11[] = {{"Male03ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan12[] = {{"Male03ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan13[] = {{"Male04ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan14[] = {{"Male05GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan15[] = {{"Male06GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan16[] = {{"Male04GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan17[] = {{"Male05ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan18[] = {{"Male05ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
};
#endif
// Can't overwrite these with empty sounds -> CTD
// Assume lock up if sound duration is 0 seconds.
// We mute the sounds instead
#ifdef DISABLE_VANILLA_HEARTBEAT
class PulsationSound {
sample0[] = {{{{"A3\sounds_f\characters\human-sfx\other\heart_4_1",0,0.7},1}}};
sample1[] = {{{{"A3\sounds_f\characters\human-sfx\other\heart_4_3",0,0.7},1}}};
sample2[] = {{{{"A3\sounds_f\characters\human-sfx\other\heart_4_4",0,0.7},1}}};
sample3[] = {{{{"A3\sounds_f\characters\human-sfx\other\heart_4_5",0,0.7},1}}};
};
#endif
// General
class HitPoints {
ADD_ACE_HITPOINTS(1,1);

View File

@ -1,6 +1,4 @@
PREP(handleDamage);
PREP(playInjuredSound);
PREP(damageBodyPart);
PREP(updateBodyPartVisuals);
PREP(setLimping);

View File

@ -21,7 +21,7 @@
}, nil, nil, true] call CBA_fnc_addClassEventHandler;
#ifdef DEBUG_MODE_FULL
[QGVAR(woundReceived), {
[QEGVAR(medical,woundReceived), {
params ["_unit", "_woundedHitPoint", "_receivedDamage", "_shooter", "_ammo"];
TRACE_5("wound",_unit,_woundedHitPoint, _receivedDamage, _shooter, _ammo);
//systemChat str _this;

View File

@ -30,741 +30,4 @@ addMissionEventHandler ["Loaded", {
} forEach GVAR(fixedStatics);
}];
// HitScream
GVAR(HitScreamNamespace) = [] call CBA_fnc_createNamespace;
GVAR(HitScreamNamespace) setVariable ["#default", "Male08ENG"];
GVAR(HitScreamNamespace) setVariable ["Male08ENG", [[
["A3\sounds_f\characters\human-sfx\P01\Low_hit_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Low_hit_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Low_hit_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Low_hit_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Low_hit_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P01\Mid_hit_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Mid_hit_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Mid_hit_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Mid_hit_4",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P01\Max_hit_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Max_hit_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Max_hit_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Max_hit_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P01\Max_hit_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male06ENG", [[
["A3\sounds_f\characters\human-sfx\P02\Low_hit_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Low_hit_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Low_hit_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Low_hit_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Low_hit_5",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Low_hit_6",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P02\Mid_hit_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Mid_hit_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Mid_hit_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Mid_hit_4",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P02\Max_hit_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Max_hit_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Max_hit_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P02\Max_hit_4",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male09ENG", [[
["A3\sounds_f\characters\human-sfx\P03\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P03\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P03\Hit_Low_3",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P03\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P03\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P03\Hit_Mid_3",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P03\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P03\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P03\Hit_Max_3",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male07ENG", [[
["A3\sounds_f\characters\human-sfx\P04\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P04\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P04\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P04\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male03GRE", [[
["A3\sounds_f\characters\human-sfx\P05\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P05\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P05\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P05\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male02ENGB", [[
["A3\sounds_f\characters\human-sfx\P06\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P06\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P06\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P06\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male01ENGB", [[
["A3\sounds_f\characters\human-sfx\P07\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P07\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P07\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P07\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male01GRE", [[
["A3\sounds_f\characters\human-sfx\P08\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P08\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P08\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P08\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male02ENG", [[
["A3\sounds_f\characters\human-sfx\P09\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P09\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P09\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P09\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male02GRE", [[
["A3\sounds_f\characters\human-sfx\P10\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P10\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P10\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P10\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male03ENG", [[
["A3\sounds_f\characters\human-sfx\P11\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P11\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P11\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P11\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male03ENGB", [[
["A3\sounds_f\characters\human-sfx\P12\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P12\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P12\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P12\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male04ENG", [[
["A3\sounds_f\characters\human-sfx\P13\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P13\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P13\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P13\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male05GRE", [[
["A3\sounds_f\characters\human-sfx\P14\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P14\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P14\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P14\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male06GRE", [[
["A3\sounds_f\characters\human-sfx\P15\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P15\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P15\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P15\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male04GRE", [[
["A3\sounds_f\characters\human-sfx\P16\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P16\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P16\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P16\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male05ENGB", [[
["A3\sounds_f\characters\human-sfx\P17\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P17\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P17\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P17\Hit_Max_5",3.1622777,1,80]
]]];
GVAR(HitScreamNamespace) setVariable ["Male05ENG", [[
["A3\sounds_f\characters\human-sfx\P18\Hit_Low_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Low_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Low_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Low_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Low_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P18\Hit_Mid_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Mid_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Mid_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Mid_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Mid_5",3.1622777,1,80]
], [
["A3\sounds_f\characters\human-sfx\P18\Hit_Max_1",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Max_2",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Max_3",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Max_4",3.1622777,1,80],
["A3\sounds_f\characters\human-sfx\P18\Hit_Max_5",3.1622777,1,80]
]]];
// InjuredMoan
GVAR(InjuredMoanNamespace) = [] call CBA_fnc_createNamespace;
GVAR(InjuredMoanNamespace) setVariable ["#default", "Male08ENG"];
GVAR(InjuredMoanNamespace) setVariable ["Male08ENG", [[
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Low_5",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Low_6",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Low_7",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Low_8",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Mid_5",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Mid_6",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Mid_7",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Mid_8",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Max_1",0.15848932,1,20],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Max_2",0.15848932,1,20],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Max_3",0.15848932,1,20],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Max_4",0.15848932,1,20],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Max_5",0.15848932,1,20],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Max_6",0.15848932,1,20],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Max_7",0.15848932,1,20],
["A3\Sounds_F\characters\human-sfx\P01\Soundinjured_Max_8",0.15848932,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male06ENG", [[
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Low_5",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Low_6",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Low_7",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Low_8",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Mid_5",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Mid_6",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Mid_7",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Mid_8",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Max_5",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Max_6",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Max_7",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P02\Soundinjured_Max_8",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male09ENG", [[
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P03\Soundinjured_Max_4",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male07ENG", [[
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P04\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male03GRE", [[
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P05\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male02ENGB", [[
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P06\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male01ENGB", [[
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P07\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male01GRE", [[
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P08\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male02ENG", [[
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P09\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male02GRE", [[
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P10\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male03ENG", [[
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P11\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male03ENGB", [[
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P12\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male04ENG", [[
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P13\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male05GRE", [[
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P14\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male06GRE", [[
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P15\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male04GRE", [[
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P16\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male05ENGB", [[
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P17\Soundinjured_Max_5",1.7782794,1,20]
]]];
GVAR(InjuredMoanNamespace) setVariable ["Male05ENG", [[
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Low_1",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Low_2",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Low_3",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Low_4",1.4125376,1,10],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Low_5",1.4125376,1,10]
], [
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Mid_1",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Mid_2",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Mid_3",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Mid_4",1.5848932,1,15],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Mid_5",1.5848932,1,15]
], [
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Max_1",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Max_2",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Max_3",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Max_4",1.7782794,1,20],
["A3\Sounds_F\characters\human-sfx\P18\Soundinjured_Max_5",1.7782794,1,20]
]]];
ADDON = true;

View File

@ -21,5 +21,3 @@ class CfgPatches {
#include "CfgExtendedAnimation.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgInGameUI.hpp"
#include "RscTitles.hpp"

View File

@ -39,6 +39,6 @@ switch (toLower _selection) do {
_unit setHitPointDamage ["HitHands", _damage];
};
case ("legs"): {
_unit setHitPointDamage ["HitLegs", _damage + ([0, LIMPING_MIN_DAMAGE] select (_unit getVariable [QGVAR(isLimping), false]))];
_unit setHitPointDamage ["HitLegs", _damage + ([0, LIMPING_MIN_DAMAGE] select (_unit getVariable [QEGVAR(medical,isLimping), false]))];
};
};

View File

@ -138,23 +138,34 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith {
// Don't trigger for minor damage.
if (_receivedDamage > 1E-3) then {
[QGVAR(woundReceived), [_unit, _woundedHitPoint, _receivedDamage, _shooter, _ammo]] call CBA_fnc_localEvent;
[QEGVAR(medical,woundReceived), [_unit, _woundedHitPoint, _receivedDamage, _shooter, _ammo]] call CBA_fnc_localEvent;
};
// resetting these single-damage-event tracker vars, if we don't do this then
// subsequent wounds will be piled onto the selection which has accumulated
// the most wounding
{
_unit setVariable [_x, 0];
} forEach [
QGVAR($HitFace),QGVAR($HitNeck),QGVAR($HitHead),
QGVAR($HitPelvis),QGVAR($HitAbdomen),QGVAR($HitDiaphragm),QGVAR($HitChest),QGVAR($HitBody),
QGVAR($HitLeftArm),QGVAR($HitRightArm),QGVAR($HitLeftLeg),QGVAR($HitRightLeg)
];
0
};
// Check for drowning damage.
// Don't change the third expression. Safe method for FLOATs.
if (_hitPoint isEqualTo "#structural" && {getOxygenRemaining _unit <= 0.5} && {_damage isEqualTo (_oldDamage + 0.005)}) exitWith {
[QGVAR(woundReceived), [_unit, "Body", _newDamage, _unit, "#drowning"]] call CBA_fnc_localEvent;
[QEGVAR(medical,woundReceived), [_unit, "Body", _newDamage, _unit, "#drowning"]] call CBA_fnc_localEvent;
0
};
// Handle vehicle crashes
if (_isCrash) exitWith {
[QGVAR(woundReceived), [_unit, "Body", _newDamage, _unit, "#vehiclecrash"]] call CBA_fnc_localEvent;
[QEGVAR(medical,woundReceived), [_unit, "Body", _newDamage, _unit, "#vehiclecrash"]] call CBA_fnc_localEvent;
0
};

View File

@ -22,7 +22,7 @@ if (!local _unit) exitWith {
ERROR("Unit not local or null");
};
_unit setVariable [QGVAR(isLimping), _isLimping, true];
_unit setVariable [QEGVAR(medical,isLimping), _isLimping, true];
// refresh
private _isDamaged = _unit getHitPointDamage "HitLegs" >= DAMAGED_MIN_THRESHOLD && {_unit getHitPointDamage "HitLegs" != LIMPING_MIN_DAMAGE};

View File

@ -15,11 +15,8 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\medical\script_macros_medical.hpp"
#include "\z\ace\addons\medical\script_macros_config.hpp"
#define EMPTY_SOUND {"A3\Sounds_F\dummysound.wss",1,1}
#define NAMESPACE_NULL locationNull
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"
#include "\z\ace\addons\medical_engine\script_macros_config.hpp"
#define PRELOAD_CLASS(class) \
diag_log format["Starting preload for ""%1""",class];\
@ -29,12 +26,6 @@
diag_log format ["Preload done for ""%1""",_this];\
}, class] call CBA_fnc_waitUntilAndExecute
#define DISABLE_VANILLA_SCREAMS
#define DISABLE_VANILLA_MOANS
#define DISABLE_VANILLA_HEARTBEAT
#define DISABLE_VANILLA_BLOOD_TEXTURES
#define DISABLE_VANILLA_DAMAGE_EFFECTS
#define PRIORITY_HEAD 3
#define PRIORITY_BODY 4
#define PRIORITY_LEFT_ARM (1 + random 1)

View File

@ -1,7 +1,7 @@
/*
Usage:
#include "\z\ace\addons\medical\script_macros_config.hpp"
#include "\z\ace\addons\medical_engine\script_macros_config.hpp"
class CfgVehicles {
class My_AwesomeUnit_base;

View File

@ -0,0 +1,105 @@
#define ALL_BODY_PARTS ["head", "body", "leftarm", "rightarm", "leftleg", "rightleg"]
#define ALL_SELECTIONS ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]
#define ALL_HITPOINTS ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]
#define MEDICAL_ACTION_DISTANCE 1.75
// scale received pain to 0-2 level to select type of scream
// below 0.25: 0, from 0.25 to 0.5: 1, more than 0.5: 2
#define PAIN_TO_SCREAM(pain) (floor (4 * pain) min 2)
// scale received pain to 0-2 level to select type of scream
// below 0.33: 0, from 0.34 to 0.66: 1, more than 0.67: 2
#define PAIN_TO_MOAN(pain) (floor (3 * pain) min 2)
#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default})
#define GET_STRING(config,default) (if (isText (config)) then {getText (config)} else {default})
#define GET_ARRAY(config,default) (if (isArray (config)) then {getArray (config)} else {default})
#define DEFAULT_HEART_RATE 80
#define DEFAULT_PERIPH_RES 100
// --- blood
// 0.077 l/kg * 80kg = 6.16l
#define DEFAULT_BLOOD_VOLUME 6.0 // in liters
#define BLOOD_VOLUME_CLASS_1_HEMORRHAGE 6.000 // lost less than 15% blood, Class I Hemorrhage
#define BLOOD_VOLUME_CLASS_2_HEMORRHAGE 5.100 // lost more than 15% blood, Class II Hemorrhage
#define BLOOD_VOLUME_CLASS_3_HEMORRHAGE 4.200 // lost more than 30% blood, Class III Hemorrhage
#define BLOOD_VOLUME_CLASS_4_HEMORRHAGE 3.600 // lost more than 40% blood, Class IV Hemorrhage
#define BLOOD_VOLUME_FATAL 3.0 // Lost more than 50% blood, Fatal
// IV Change per second calculation:
// 250 ml should take 60 seconds to fill. 250 ml / 60 s ~ 4.1667 ml/s.
#define IV_CHANGE_PER_SECOND 4.1667 // in milliliters per second
// Minimum amount of damage required for penetrating wounds (also minDamage for velocity wounds)
#define PENETRATION_THRESHOLD 0.35
// To be replaced by a proper blood pressure calculation
#define BLOOD_LOSS_KNOCK_OUT_THRESHOLD 0.5 // 50% of cardiac output
// --- pain
#define PAIN_UNCONSCIOUS 0.5
// Pain fade out time (time it takes until pain is guaranteed to be completly gone)
#define PAIN_FADE_TIME 900
// Only relevant when advanced medication is disabled
// Morphine pain suppression fade out time (time it takes until pain suppression is guaranteed to be completly gone)
#define PAIN_SUPPRESSION_FADE_TIME 1800
// Chance to wake up when vitals are stable (checked once every SPONTANEOUS_WAKE_UP_INTERVAL seconds)
#define SPONTANEOUS_WAKE_UP_INTERVAL 15
#define LETHAL_HEAD_DAMAGE_THRESHOLD 1.0
// Minimum leg damage required for limping
#define LIMPING_DAMAGE_THRESHOLD 0.30
// Minimum body part damage required for blood effect on uniform
#define VISUAL_BODY_DAMAGE_THRESHOLD 0.35
// - Unit Variables ----------------------------------------------------
// These variables get stored in object space and used across components
// Defined here for easy consistency with GETVAR/SETVAR (also a list for reference)
#define VAR_BLOOD_PRESS QEGVAR(medical,bloodPressure)
#define VAR_BLOOD_VOL QEGVAR(medical,bloodVolume)
#define VAR_CRDC_ARRST QEGVAR(medical,inCardiacArrest)
#define VAR_HEART_RATE QEGVAR(medical,heartRate)
#define VAR_PAIN QEGVAR(medical,pain)
#define VAR_PAIN_SUPP QEGVAR(medical,painSuppress)
#define VAR_PERIPH_RES QEGVAR(medical,peripheralResistance)
#define VAR_UNCON "ACE_isUnconscious"
// These variables track gradual adjustments (from medication, etc.)
#define VAR_HEART_RATE_ADJ QEGVAR(medical,heartRateAdjustments)
#define VAR_PAIN_SUPP_ADJ QEGVAR(medical,painSuppressAdjustments)
#define VAR_PERIPH_RES_ADJ QEGVAR(medical,peripheralResistanceAdjustments)
// These variables track the current state of status values above
#define VAR_HEMORRHAGE QEGVAR(medical,hemorrhage)
#define VAR_IN_PAIN QEGVAR(medical,inPain)
#define VAR_IS_BLEEDING QEGVAR(medical,isBleeding)
// - Unit Functions ---------------------------------------------------
// Retrieval macros for common unit values
// Defined for easy consistency and speed
#define GET_BLOOD_VOLUME(unit) (unit getVariable [VAR_BLOOD_VOL,DEFAULT_BLOOD_VOLUME])
#define GET_HEART_RATE(unit) (unit getVariable [VAR_HEART_RATE,DEFAULT_HEART_RATE])
#define GET_HEMORRHAGE(unit) (unit getVariable [VAR_HEMORRHAGE,0])
#define GET_PAIN(unit) (unit getVariable [VAR_PAIN,0])
#define GET_PAIN_SUPPRESS(unit) (unit getVariable [VAR_PAIN_SUPP,0])
#define IN_CRDC_ARRST(unit) (unit getVariable [VAR_CRDC_ARRST,false])
#define IS_BLEEDING(unit) (unit getVariable [VAR_IS_BLEEDING,false])
#define IS_IN_PAIN(unit) (unit getVariable [VAR_IN_PAIN,false])
#define IS_UNCONSCIOUS(unit) (unit getVariable [VAR_UNCON,false])
// The following function calls are defined here just for consistency
#define GET_BLOOD_LOSS(unit) ([unit] call EFUNC(medical_status,getBloodLoss))
#define GET_BLOOD_PRESSURE(unit) ([unit] call EFUNC(medical_status,getBloodPressure))
// Derivative unit values commonly used
#define GET_PAIN_PERCEIVED(unit) (0 max (GET_PAIN(unit) - GET_PAIN_SUPPRESS(unit)) min 1)

View File

@ -0,0 +1 @@
z\ace\addons\medical_feedback

View File

@ -0,0 +1,62 @@
class CfgVehicles {
class Man;
class CAManBase: Man {
// Delete base game sounds.
// These are never played for ai and remote players.
#ifdef DISABLE_VANILLA_SCREAMS
class SoundHitScream {
person1[] = {{"Male08ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person2[] = {{"Male06ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person3[] = {{"Male09ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person4[] = {{"Male07ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person5[] = {{"Male03GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person6[] = {{"Male02ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person7[] = {{"Male01ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person8[] = {{"Male01GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person9[] = {{"Male02ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person10[] = {{"Male02GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person11[] = {{"Male03ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person12[] = {{"Male03ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person13[] = {{"Male04ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person14[] = {{"Male05GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person15[] = {{"Male06GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person16[] = {{"Male04GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person17[] = {{"Male05ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person18[] = {{"Male05ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
};
#endif
#ifdef DISABLE_VANILLA_MOANS
class SoundInjured {
person_moan1[] = {{"Male08ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan2[] = {{"Male06ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan3[] = {{"Male09ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan4[] = {{"Male07ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan5[] = {{"Male03GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan6[] = {{"Male02ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan7[] = {{"Male01ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan8[] = {{"Male01GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan9[] = {{"Male02ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan10[] = {{"Male02GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan11[] = {{"Male03ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan12[] = {{"Male03ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan13[] = {{"Male04ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan14[] = {{"Male05GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan15[] = {{"Male06GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan16[] = {{"Male04GRE"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan17[] = {{"Male05ENGB"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
person_moan18[] = {{"Male05ENG"},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}},{{EMPTY_SOUND,1}}};
};
#endif
// Can't overwrite these with empty sounds -> CTD
// Assume lock up if sound duration is 0 seconds.
// We mute the sounds instead
#ifdef DISABLE_VANILLA_HEARTBEAT
class PulsationSound {
sample0[] = {{{{"A3\sounds_f\characters\human-sfx\other\heart_4_1",0,0.7},1}}};
sample1[] = {{{{"A3\sounds_f\characters\human-sfx\other\heart_4_3",0,0.7},1}}};
sample2[] = {{{{"A3\sounds_f\characters\human-sfx\other\heart_4_4",0,0.7},1}}};
sample3[] = {{{{"A3\sounds_f\characters\human-sfx\other\heart_4_5",0,0.7},1}}};
};
#endif
};
};

View File

@ -1,5 +1,3 @@
TRACE_1("",QUOTE(ADDON));
PREP(effectBleeding);
PREP(effectBloodVolume);
PREP(effectHeartBeat);
@ -8,3 +6,4 @@ PREP(effectPain);
PREP(effectUnconscious);
PREP(handleEffects);
PREP(initEffects);
PREP(playInjuredSound);

Some files were not shown because too many files have changed in this diff Show More