Make GPS respect shroud

This commit is contained in:
Pavel Penev
2015-11-17 19:03:54 +02:00
parent 78e2eabd17
commit 8d4d37ca46
2 changed files with 4 additions and 3 deletions

View File

@@ -159,7 +159,7 @@ namespace OpenRA
public bool CanTargetActor(Actor a) public bool CanTargetActor(Actor a)
{ {
if (HasFogVisibility) if (HasFogVisibility && fogVisibilities.Any(f => f.IsVisible(a)))
return true; return true;
return CanViewActor(a); return CanViewActor(a);

View File

@@ -79,7 +79,8 @@ namespace OpenRA.Mods.RA.Effects
if (disguise.Value != null && disguise.Value.Disguised) if (disguise.Value != null && disguise.Value.Disguised)
return false; return false;
if (huf.Value != null && !huf.Value.IsVisible(self, toPlayer)) if (huf.Value != null && !huf.Value.IsVisible(self, toPlayer)
&& toPlayer.Shroud.IsExplored(self.CenterPosition))
return true; return true;
if (fuf.Value == null) if (fuf.Value == null)
@@ -92,7 +93,7 @@ namespace OpenRA.Mods.RA.Effects
if (f.HasRenderables || f.NeedRenderables) if (f.HasRenderables || f.NeedRenderables)
return false; return false;
return f.Visible; return f.Visible && !f.Shrouded;
} }
public void Tick(World world) public void Tick(World world)