diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index 634212354c..4126ca328c 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -14,7 +14,7 @@ if (isServer) then { ["ace_firedPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler; ["ace_firedNonPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler; - [LINKFUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler; + addMissionEventHandler ["EachFrame", {call FUNC(masterPFH)}]; }] call CBA_fnc_addEventHandler; // Cache for ammo type configs diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index 569dd87dc4..d2c6f3b7df 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -62,11 +62,9 @@ simulWeatherSync; ["ace_settingsInitialized",{ TRACE_1("ace_settingsInitialized eh",GVAR(syncRain)); - //Create a 0 sec delay PFEH to update rain every frame: + // update rain every frame: if (GVAR(syncRain)) then { - [{ - 0 setRain GVAR(ACE_rain); - }, 0, []] call CBA_fnc_addPerFrameHandler; + addMissionEventHandler ["EachFrame", {0 setRain GVAR(ACE_rain)}]; }; //Create a 1 sec delay PFEH to update wind/rain/temp/humidity: