diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 974e8b8c415..181b7099c62 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -19,7 +19,7 @@ //Status Effect EHs: [QGVAR(setStatusEffect), {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler; -["forceWalk", false, ["ace_advanced_fatigue", "ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_Trenches"]] call FUNC(statusEffect_addType); +["forceWalk", false, ["ace_advanced_fatigue", "ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_Trenches", "ace_medical_fracture"]] call FUNC(statusEffect_addType); ["blockSprint", false, ["ace_advanced_fatigue", "ace_medical_fracture"]] call FUNC(statusEffect_addType); ["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered)]] call FUNC(statusEffect_addType); ["blockDamage", false, ["fixCollision", "ACE_cargo"]] call FUNC(statusEffect_addType); diff --git a/addons/medical/dev/watchVariable.sqf b/addons/medical/dev/watchVariable.sqf index 0d02a74e193..94ff6b4c29a 100644 --- a/addons/medical/dev/watchVariable.sqf +++ b/addons/medical/dev/watchVariable.sqf @@ -69,7 +69,8 @@ GVAR(dev_watchVariableRunning) = true; private _fractures = GET_FRACTURES(_unit); private _canSprint = if (isSprintAllowed _unit) then {""} else {"[Sprint Blocked]"}; - _return pushBack format ["Fractures: %1 %2", _fractures, _canSprint]; + private _forceWalk = if (isForcedWalk _unit) then {"[Forced Walking]"} else {""}; + _return pushBack format ["Fractures: %1 %2%3", _fractures, _canSprint, _forceWalk]; // Tourniquets: diff --git a/addons/medical/initSettings.sqf b/addons/medical/initSettings.sqf index 367b4f56ba2..065314fcf97 100644 --- a/addons/medical/initSettings.sqf +++ b/addons/medical/initSettings.sqf @@ -14,7 +14,7 @@ "LIST", [LSTRING(Fractures_DisplayName), LSTRING(Fractures_Description)], LSTRING(Category), - [[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(Fractures_SplintHealsFully), LSTRING(Fractures_SplintHasEffects)], 1], + [[0, 1, 2, 3], [ELSTRING(common,Disabled), LSTRING(Fractures_SplintHealsFully), LSTRING(Fractures_SplintHealsNoSprint), LSTRING(Fractures_SplintHealsNoJog)], 1], true, {}, true diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index ebb9f92622a..e0c072903c4 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -169,7 +169,7 @@ Férulas sanan completamente las fracturas Schienen heilen Knochenbrüche vollständig - + Splints Heal, but Cannot Sprint Шины вылечивают, но не дают бегать 添え木で治癒可能、走れないように @@ -183,6 +183,10 @@ Las férulas sanan, pero no pueden correr Schienen heilen, aber ermöglichen kein Sprinten + + Splints Heal, but Cannot Jog + Les attelles guérissent les fractures, mais empêchent de courir + Fracture Chance Chance de fracture diff --git a/addons/medical_engine/functions/fnc_updateDamageEffects.sqf b/addons/medical_engine/functions/fnc_updateDamageEffects.sqf index b58faf4057c..107a1945c66 100644 --- a/addons/medical_engine/functions/fnc_updateDamageEffects.sqf +++ b/addons/medical_engine/functions/fnc_updateDamageEffects.sqf @@ -1,11 +1,10 @@ #include "script_component.hpp" /* * Author: commy2, PabstMirror - * Updates damage effects for limping and fractures + * Updates damage effects for limping and fractures. * * Arguments: * 0: Unit - * 1: Limping (optional, default: true) * * Return Value: * None @@ -33,12 +32,15 @@ if (EGVAR(medical,fractures) > 0) then { if ((_fractures select 2) == 1) then { _aimFracture = _aimFracture + 4; }; if ((_fractures select 3) == 1) then { _aimFracture = _aimFracture + 4; }; - if (EGVAR(medical,fractures) == 2) then { // the limp with a splint will still cause effects - private _isSprintBlocked = ((_fractures select 4) == -1) || {(_fractures select 5) == -1}; // block sprinting if we have a leg splint on - if (_isSprintBlocked || {!isSprintAllowed _unit}) then { // only update status effect if we need to - TRACE_1("updating status effect",_isSprintBlocked); - [_unit, "blockSprint", QEGVAR(medical,fracture), _isSprintBlocked] call EFUNC(common,statusEffect_set); + if (EGVAR(medical,fractures) in [2, 3]) then { // the limp with a splint will still cause effects + // Block sprint / force walking based on fracture setting and leg splint status + private _hasLegSplint = (_fractures select 4) == -1 || {(_fractures select 5) == -1}; + if (EGVAR(medical,fractures) == 2) then { + [_unit, "blockSprint", QEGVAR(medical,fracture), _hasLegSplint] call EFUNC(common,statusEffect_set); + } else { + [_unit, "forceWalk", QEGVAR(medical,fracture), _hasLegSplint] call EFUNC(common,statusEffect_set); }; + if ((_fractures select 2) == -1) then { _aimFracture = _aimFracture + 2; }; if ((_fractures select 3) == -1) then { _aimFracture = _aimFracture + 2; }; }; diff --git a/addons/medical_gui/functions/fnc_updateBodyImage.sqf b/addons/medical_gui/functions/fnc_updateBodyImage.sqf index c522f95a637..3a1f756f798 100644 --- a/addons/medical_gui/functions/fnc_updateBodyImage.sqf +++ b/addons/medical_gui/functions/fnc_updateBodyImage.sqf @@ -51,7 +51,7 @@ private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0]; _ctrlBone ctrlSetTextColor [1, 0, 0, 1]; }; case -1: { - if (EGVAR(medical,fractures) == 2) then { + if (EGVAR(medical,fractures) in [2, 3]) then { _ctrlBone ctrlShow true; _ctrlBone ctrlSetTextColor [0, 0, 1, 1]; } else { diff --git a/addons/medical_gui/functions/fnc_updateInjuryList.sqf b/addons/medical_gui/functions/fnc_updateInjuryList.sqf index ef186242544..66d78c253ea 100644 --- a/addons/medical_gui/functions/fnc_updateInjuryList.sqf +++ b/addons/medical_gui/functions/fnc_updateInjuryList.sqf @@ -65,8 +65,8 @@ switch (GET_FRACTURES(_target) select _selectionN) do { _entries pushBack [localize LSTRING(Status_Fractured), [1, 0, 0, 1]]; }; case -1: { - if (EGVAR(medical,fractures) == 2) then { // Ignore if the splint has no effect - _entries pushBack [localize LSTRING(Status_SplintApplied), [1, 1, 1, 1]]; + if (EGVAR(medical,fractures) in [2, 3]) then { // Ignore if the splint has no effect + _entries pushBack [localize LSTRING(Status_SplintApplied), [0.2, 0.2, 1, 1]]; }; }; };