diff --git a/addons/medical_engine/CfgFunctions.hpp b/addons/medical_engine/CfgFunctions.hpp new file mode 100644 index 0000000000..7b6fc41278 --- /dev/null +++ b/addons/medical_engine/CfgFunctions.hpp @@ -0,0 +1,10 @@ +class CfgFunctions { + class A3_Mark { + class Revive { + class reviveInit { + // Disable BI medical system + postInit = 0; + }; + }; + }; +}; diff --git a/addons/medical_engine/XEH_PREP.hpp b/addons/medical_engine/XEH_PREP.hpp index cb6874c5b6..63faaf7bbe 100644 --- a/addons/medical_engine/XEH_PREP.hpp +++ b/addons/medical_engine/XEH_PREP.hpp @@ -1,9 +1,10 @@ -PREP(handleDamage); +PREP(applyAnimAfterRagdoll); PREP(damageBodyPart); -PREP(updateBodyPartVisuals); -PREP(updateDamageEffects); -PREP(setStructuralDamage); -PREP(setUnconsciousAnim); +PREP(disableThirdParty); PREP(getHitpointArmor); PREP(getItemArmor); -PREP(applyAnimAfterRagdoll); +PREP(handleDamage); +PREP(setStructuralDamage); +PREP(setUnconsciousAnim); +PREP(updateBodyPartVisuals); +PREP(updateDamageEffects); diff --git a/addons/medical_engine/XEH_preInit.sqf b/addons/medical_engine/XEH_preInit.sqf index 96481be0e7..429bdc8acb 100644 --- a/addons/medical_engine/XEH_preInit.sqf +++ b/addons/medical_engine/XEH_preInit.sqf @@ -78,4 +78,6 @@ addMissionEventHandler ["Loaded", { }; }] call CBA_fnc_addEventhandler; +[] call FUNC(disableThirdParty); + ADDON = true; diff --git a/addons/medical_engine/config.cpp b/addons/medical_engine/config.cpp index 698428a632..be5dc54040 100644 --- a/addons/medical_engine/config.cpp +++ b/addons/medical_engine/config.cpp @@ -14,10 +14,10 @@ class CfgPatches { }; }; -#include "CfgEventHandlers.hpp" - #include "CfgActions.hpp" -#include "CfgMoves.hpp" +#include "CfgEventHandlers.hpp" #include "CfgExtendedAnimation.hpp" +#include "CfgFunctions.hpp" +#include "CfgMoves.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/medical_engine/functions/fnc_disableThirdParty.sqf b/addons/medical_engine/functions/fnc_disableThirdParty.sqf new file mode 100644 index 0000000000..5caa2fd74d --- /dev/null +++ b/addons/medical_engine/functions/fnc_disableThirdParty.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" +/* + * Author: BaerMitUmlaut + * Detects and disables third party medical systems. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_medical_engine_fnc_disableThirdParty + * + * Public: No + */ + +// SOG:PF CDLC revive system +// Pretend revive system was already initialized. +// See: vn_fnc_module_advancedrevive +vn_advanced_revive_started = true; + +// Farooq Revive +// Overwrite player initialization. +far_player_init = compileFinal ""; +[{!isNil "far_debugging"}, { + far_isDragging = nil; // Disable "Drag & Carry animation fix" loop - cannot be killed because spawned while true. + far_muteRadio = nil; // Disable initialization hint. + far_muteACRE = nil; // Same, but for very old versions. + far_debugging = false; // Disable adding event handlers to AI in SP. +}, [], 5] call CBA_fnc_waitUntilAndExecute;