diff --git a/addons/overheating/CfgWeapons.hpp b/addons/overheating/CfgWeapons.hpp index 12cfe6e498..c7a83eec6e 100644 --- a/addons/overheating/CfgWeapons.hpp +++ b/addons/overheating/CfgWeapons.hpp @@ -2,17 +2,6 @@ class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; - class ACE_SpareBarrel: ACE_ItemCore { - displayname = CSTRING(SpareBarrelName); - descriptionshort = CSTRING(SpareBarrelDescription); - //model = ""; - picture = QPATHTOF(UI\spare_barrel_ca.paa); - scope = 2; - class ItemInfo: InventoryItem_Base_F { - mass = 30; - }; - }; - class RifleCore; class Rifle: RifleCore { //Mean Rounds Between Stoppages (this will be scaled based on the barrel temp) diff --git a/addons/overheating/functions/fnc_displayTemperature.sqf b/addons/overheating/functions/fnc_displayTemperature.sqf index b2b8d2b4c0..e829b61f57 100644 --- a/addons/overheating/functions/fnc_displayTemperature.sqf +++ b/addons/overheating/functions/fnc_displayTemperature.sqf @@ -3,7 +3,7 @@ * Displays the weapon temperature * * Arguments: - * 0: Player + * 0: Unit * 1: Weapon * * Return Values: @@ -16,11 +16,13 @@ */ #include "script_component.hpp" -params ["_player", "_weapon"]; -TRACE_2("params",_player,_weapon); +params ["_unit", "_weapon"]; +TRACE_2("params",_unit,_weapon); + +// Get unit's weapon's temperature: +private _tempVarName = format [QGVAR(%1_temp), _weapon]; +private _temperature = _unit getVariable [_tempVarName, 0]; -// Calculate cool down of weapon since last shot -private _temperature = [_player, _weapon, 0] call FUNC(updateTemperature); private _scaledTemperature = (_temperature / 1000) min 1; private _color = [ @@ -41,6 +43,8 @@ for "_a" from (_count + 1) to 12 do { _string = _string + "|"; }; +TRACE_3("",_temperature,_color,_string); + _text = composeText [_text, [_string, [0.5, 0.5, 0.5]] call EFUNC(common,stringToColoredText)]; private _picture = getText (configFile >> "CfgWeapons" >> _weapon >> "picture"); diff --git a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf index d6a9ccfe37..5f0b3ae3a9 100644 --- a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf +++ b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf @@ -50,4 +50,4 @@ _gunner setVariable [format [QGVAR(%1_temp), _weapon], _coolestTemp, true]; [GVAR(storedSpareBarrels), _coolestMag, [_weaponTemp, CBA_missionTime, _barrelMass]] call CBA_fnc_hashSet; // Send an event so the machines of the assistant and gunner can show the hint -[QGVAR(showWeaponTemperature), _gunner], [_gunner, _weapon], [_assistant] call CBA_fnc_targetEvent; +[QGVAR(showWeaponTemperature), [_gunner, _weapon], [_assistant, _gunner]] call CBA_fnc_targetEvent;