From 6e5bc96f11eccf371b95d8f06c07e3b0dac31012 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 8 May 2017 19:47:00 -0500 Subject: [PATCH] Switch 2 perm PFEH to everyFrame --- addons/frag/XEH_postInit.sqf | 2 +- addons/weather/XEH_postInit.sqf | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index 634212354c1..4126ca328ce 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 569dd87dc4d..d2c6f3b7dfb 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: