IsVisible patched to know about GPS

This commit is contained in:
Chris Forbes
2010-05-01 14:48:54 +12:00
parent 71cdb81ad8
commit 897c102d8e

View File

@@ -146,6 +146,9 @@ namespace OpenRA
public static bool IsVisible(this Actor a)
{
if (a.World.LocalPlayer.Shroud.Disabled)
return true;
var shroud = a.World.WorldActor.traits.Get<Shroud>();
if (!Shroud.GetVisOrigins(a).Any(o => shroud.exploredCells[o.X, o.Y])) // covered by shroud
return false;