mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
UI - Fix UAVs not being considered vehicles for HUD elements (#9288)
* consider UAVs as vehicles for UI display * fix condition * readd reload ui condition * improved UAV check * use getConnectedUAVUnit Co-authored-by: PabstMirror <pabstmirror@gmail.com> --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
7f24dc2282
commit
4fea9669bb
@ -1,7 +1,7 @@
|
||||
class ACE_UI {
|
||||
class ammoCount {
|
||||
class conditions {
|
||||
ADDON = "cameraOn == (getConnectedUAV ACE_player)";
|
||||
ADDON = "false";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -33,9 +33,10 @@ _cachedElement params ["_idd", "_elements", "_location", "_conditions"];
|
||||
|
||||
// Exit if main vehicle type condition not fitting
|
||||
private _canUseWeaponOrInCargo = ACE_player call CBA_fnc_canUseWeapon || {-1 < vehicle ACE_player getCargoIndex ACE_player};
|
||||
private _inUAVCamera = !isNull getConnectedUAVUnit player; // explictly using player
|
||||
if (
|
||||
(_canUseWeaponOrInCargo && {_location == VEHICLE_ONLY})
|
||||
|| {!_canUseWeaponOrInCargo && {_location == GROUND_ONLY}}
|
||||
(_canUseWeaponOrInCargo && {!_inUAVCamera} && {_location == VEHICLE_ONLY})
|
||||
|| {(!_canUseWeaponOrInCargo || {_inUAVCamera}) && {_location == GROUND_ONLY}}
|
||||
) exitWith {
|
||||
TRACE_3("skip location",_this,_canUseWeaponOrInCargo,_location);
|
||||
false
|
||||
@ -51,7 +52,7 @@ if (
|
||||
};
|
||||
_show = false;
|
||||
};
|
||||
} count _conditions;
|
||||
} forEach _conditions;
|
||||
|
||||
// Get setting from scripted API
|
||||
if (!_force) then {
|
||||
@ -85,8 +86,7 @@ private _success = false;
|
||||
|
||||
_control ctrlSetFade _fade;
|
||||
_control ctrlCommit 0;
|
||||
} count _displays;
|
||||
nil
|
||||
} count _elements;
|
||||
} forEach _displays;
|
||||
} forEach _elements;
|
||||
|
||||
_success
|
||||
|
Loading…
Reference in New Issue
Block a user