diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 846b1b0b73..15dff8ee1b 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -32,3 +32,17 @@ GVAR(weaponInfoCache) setText QGVAR(weaponInfoCache); }, {false}, [19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key + + +// Create a PFH to cool down all player weapons at (infrequent) regular intervals +[{ + if (primaryWeapon ACE_player) != "") then { + [ACE_player, primaryWeapon ACE_player, 0] call FUNC(updateTemperature); + }; + if (handgunWeapon ACE_player) != "") then { + [ACE_player, handgunWeapon ACE_player, 0] call FUNC(updateTemperature); + }; + if (secondaryWeapon ACE_player) != "") then { + [ACE_player, secondaryWeapon ACE_player, 0] call FUNC(updateTemperature); + }; +}, 5, []] call CBA_fnc_addPerFrameHandler;