From ff4ba98e6830b42a8f68851a1dbf099933a17ea7 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 10 Feb 2016 11:50:30 -0600 Subject: [PATCH] Pre-load again on mission load (save game) --- addons/medical/XEH_preInit.sqf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index b8a223510f..189d6b207d 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -144,6 +144,16 @@ private _fixStatic = { }; ["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler; ["Car", "init", _fixStatic] call CBA_fnc_addClassEventHandler; +addMissionEventHandler ["Loaded",{ + { + TRACE_1("starting preload (save load)",_x); + [{ + 1 preloadObject (_this select 0); + }, { + TRACE_1("preload done",_this); + }, [_x]] call EFUNC(common,waitUntilAndExecute); + } forEach GVAR(fixedStatics); +}]; ADDON = true;