Artillery Tables - Fix artillery UI not refreshing when being teleported from one vehicle to another (#10217)

This commit is contained in:
johnb432 2024-08-17 17:56:51 +02:00 committed by GitHub
parent 094e235f7a
commit bdf6a179ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,10 +4,13 @@
TRACE_2("CBA_settingsInitialized",GVAR(advancedCorrections),GVAR(disableArtilleryComputer)); TRACE_2("CBA_settingsInitialized",GVAR(advancedCorrections),GVAR(disableArtilleryComputer));
if (hasInterface) then { if (hasInterface) then {
// Add hud overlay for actuall azimuth and elevation: // Add hud overlay for actual azimuth and elevation:
GVAR(pfID) = -1; GVAR(pfID) = -1;
["turret", LINKFUNC(turretChanged), true] call CBA_fnc_addPlayerEventHandler; ["turret", LINKFUNC(turretChanged), true] call CBA_fnc_addPlayerEventHandler;
// Handles being teleported from one vehicle to another
["vehicle", {[_this select 0, (_this select 1) unitTurret (_this select 0)] call FUNC(turretChanged)}] call CBA_fnc_addPlayerEventHandler;
// Add ability to dynamically open rangetables: // Add ability to dynamically open rangetables:
["ace_interactMenuOpened", LINKFUNC(interactMenuOpened)] call CBA_fnc_addEventHandler; ["ace_interactMenuOpened", LINKFUNC(interactMenuOpened)] call CBA_fnc_addEventHandler;
}; };