mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Display the new weapon temperature right after swapping barrels
This commit is contained in:
parent
850a499c0e
commit
d886289716
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user