diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 0e8eaad7c4..831c2c2348 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -55,3 +55,8 @@ GVAR(cacheSilencerData) = call CBA_fnc_createNamespace; ["firedPlayerNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); }; }] call EFUNC(common,addEventHandler); + +// Install event handlers to display temp when a barrel was swapped +["barrelSwapped", { + _this call FUNC(displayTemperature); +}] call EFUNC(common,addEventHandler); diff --git a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf index 23d2c7959e..dd58d58207 100644 --- a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf +++ b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf @@ -48,3 +48,5 @@ _unit setVariable [format [QGVAR(%1_temp), _weapon], _coolestTemp, true]; // Heat up the coolest barrel to the former weapon temperature [GVAR(storedSpareBarrels), _coolestMag, [_weaponTemp, ACE_Time, _barrelMass]] call CBA_fnc_hashSet; +// Send an event so the local machine can show the hint +["barrelSwapped", _unit, [_unit, _weapon]] call EFUNC(common,objectEvent); diff --git a/addons/overheating/functions/fnc_swapBarrelCallback.sqf b/addons/overheating/functions/fnc_swapBarrelCallback.sqf index 6eba214617..62a3b13ef6 100644 --- a/addons/overheating/functions/fnc_swapBarrelCallback.sqf +++ b/addons/overheating/functions/fnc_swapBarrelCallback.sqf @@ -24,9 +24,6 @@ TRACE_2("params",_player,_weapon); _player playAction QGVAR(GestureMountMuzzle); playSound "ACE_BarrelSwap"; -// don't consume the barrel, but rotate through them. -[localize LSTRING(SwappedBarrel), QUOTE(PATHTOF(UI\spare_barrel_ca.paa))] call EFUNC(common,displayTextPicture); - private _temp = _player getVariable [format [QGVAR(%1_temp), _weapon], 0]; private _barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0;