Radar takes into account visibility under fog
This commit is contained in:
@@ -17,7 +17,7 @@ namespace OpenRA.Traits
|
||||
public object Create(ActorInitializer init) { return new HiddenUnderFog(init.self); }
|
||||
}
|
||||
|
||||
class HiddenUnderFog : IRenderModifier
|
||||
class HiddenUnderFog : IRenderModifier, IRadarVisibilityModifier
|
||||
{
|
||||
Shroud shroud;
|
||||
|
||||
@@ -33,6 +33,11 @@ namespace OpenRA.Traits
|
||||
|| self.World.LocalPlayer.Shroud.Disabled
|
||||
|| shroud.visibleCells[self.Location.X, self.Location.Y] > 0;
|
||||
}
|
||||
|
||||
public bool VisibleOnRadar(Actor self)
|
||||
{
|
||||
return IsVisible(self);
|
||||
}
|
||||
|
||||
static Renderable[] Nothing = { };
|
||||
public IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r)
|
||||
|
||||
Reference in New Issue
Block a user