mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#1856 - Close huntIR monitor if item removed
This commit is contained in:
parent
04e137090b
commit
b6e124d340
@ -63,6 +63,11 @@ GVAR(no_cams) sort true;
|
||||
GVAR(no_cams) set [_forEachIndex, _x select 1];
|
||||
} forEach GVAR(no_cams);
|
||||
[{
|
||||
//Close monitor if we no longer have the item:
|
||||
if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable ["ace_huntir_monitor", displayNull])}) then {
|
||||
closeDialog 0;
|
||||
};
|
||||
|
||||
GVAR(nearHuntIRs) = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE];
|
||||
{
|
||||
if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))} && {_x getHitPointDamage "HitCamera" < 0.25}) then {
|
||||
|
@ -38,6 +38,11 @@ createDialog "ace_huntir_cam_dialog_off";
|
||||
GVAR(messageSearching) = toArray "Searching.....";
|
||||
GVAR(messageConnecting) = toArray "Connecting.....";
|
||||
[{
|
||||
//Close monitor if we no longer have item:
|
||||
if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable ["ace_huntir_monitor", displayNull])}) then {
|
||||
closeDialog 0;
|
||||
};
|
||||
|
||||
private ["_elapsedTime", "_nearestHuntIRs"];
|
||||
_elapsedTime = ACE_time - GVAR(startTime);
|
||||
_nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE];
|
||||
|
Loading…
Reference in New Issue
Block a user