diff --git a/addons/overheating/XEH_preInit.sqf b/addons/overheating/XEH_preInit.sqf index 9b2c410ab4..fb3c53040d 100644 --- a/addons/overheating/XEH_preInit.sqf +++ b/addons/overheating/XEH_preInit.sqf @@ -3,8 +3,8 @@ PREP(checkTemperature); PREP(clearJam); PREP(cooldown); +PREP(displayTemperature); PREP(jamWeapon); PREP(overheat); -PREP(pfhDisplayTemperature); PREP(swapBarrel); PREP(swapBarrelCallback); diff --git a/addons/overheating/functions/fnc_checkTemperature.sqf b/addons/overheating/functions/fnc_checkTemperature.sqf index b2cf0f80c5..92b6d1727e 100644 --- a/addons/overheating/functions/fnc_checkTemperature.sqf +++ b/addons/overheating/functions/fnc_checkTemperature.sqf @@ -25,4 +25,4 @@ if (_action == "") then { _player playActionNow _action; // Launch a PFH that waits a sec before displaying the temperature -[FUNC(pfhDisplayTemperature), 1.0, [_player, _weapon, diag_tickTime]] call CBA_fnc_addPerFrameHandler; +[FUNC(displayTemperature), [_player, _weapon], 1.0, 0] call EFUNC(common,waitAndExecute); \ No newline at end of file diff --git a/addons/overheating/functions/fnc_pfhDisplayTemperature.sqf b/addons/overheating/functions/fnc_displayTemperature.sqf similarity index 83% rename from addons/overheating/functions/fnc_pfhDisplayTemperature.sqf rename to addons/overheating/functions/fnc_displayTemperature.sqf index 1a03069624..130eec5f39 100644 --- a/addons/overheating/functions/fnc_pfhDisplayTemperature.sqf +++ b/addons/overheating/functions/fnc_displayTemperature.sqf @@ -1,7 +1,7 @@ /* * Author: Commy2 and CAA-Picard * - * PFH that displays the weapon temperature after a slight delay + * Displays the weapon temperature * * Arguments: * 0: _player @@ -13,14 +13,7 @@ */ #include "\z\ace\addons\overheating\script_component.hpp" -EXPLODE_2_PVT(_this,_params,_pfhId); -EXPLODE_3_PVT(_params,_player,_weapon,_startTime); - -// Skip the first execution of the PFH -if (diag_tickTime < _startTime + 0.5) exitWith {}; - -// Remove the PFH on the second execution -[_pfhId] call cba_fnc_removePerFrameHandler; +EXPLODE_2_PVT(_this,_player,_weapon); // Calculate cool down of weapon since last shot private ["_string", "_overheat", "_temperature", "_time", "_barrelMass"];