mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
[FIXED] Group not turning off due to conflicting condition checking true and false (if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then)
[FIXED] Units turning on for same coalition aircrafts in radius
This commit is contained in:
parent
0ffcdf2f66
commit
e87dc525b9
@ -288,7 +288,7 @@ function TIRESIAS:_InitGroups()
|
||||
}
|
||||
end
|
||||
if grp.Tiresias and (not grp.Tiresias.exception == true) then
|
||||
if grp.Tiresias.invisible and grp.Tiresias.invisible == false then
|
||||
if grp.Tiresias.invisible == false then
|
||||
grp:SetCommandInvisible(true)
|
||||
grp.Tiresias.invisible = true
|
||||
if SwitchAAA then
|
||||
@ -315,7 +315,7 @@ function TIRESIAS:_InitGroups()
|
||||
}
|
||||
end
|
||||
if grp.Tiresias and (not grp.Tiresias.exception == true) then
|
||||
if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then
|
||||
if grp.Tiresias and grp.Tiresias.invisible == false then
|
||||
grp:SetCommandInvisible(true)
|
||||
grp:SetAIOff()
|
||||
grp.Tiresias.invisible = true
|
||||
@ -336,7 +336,7 @@ function TIRESIAS:_InitGroups()
|
||||
}
|
||||
end
|
||||
if grp.Tiresias and (not grp.Tiresias.exception == true) then
|
||||
if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then
|
||||
if grp.Tiresias and grp.Tiresias.invisible == false then
|
||||
grp:SetCommandInvisible(true)
|
||||
grp.Tiresias.invisible = true
|
||||
end
|
||||
@ -392,7 +392,8 @@ function TIRESIAS:_SwitchOnGroups(group,radius)
|
||||
ground:ForEachGroupAlive(
|
||||
function(grp)
|
||||
local name = grp:GetName()
|
||||
if grp.Tiresias and grp.Tiresias.type and (not grp.Tiresias.exception == true ) then
|
||||
if grp:GetCoalition() ~= group:GetCoalition()
|
||||
and grp.Tiresias and grp.Tiresias.type and (not grp.Tiresias.exception == true ) then
|
||||
if grp.Tiresias.invisible == true then
|
||||
grp:SetCommandInvisible(false)
|
||||
grp.Tiresias.invisible = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user