Agreeing with Paul, tested this and that is what I experienced as well.


On Thu, Jul 4, 2013 at 5:01 AM, Paul Chote <notifications@github.com> wrote:

> In OpenRA.Mods.RA/Effects/RepairIndicator.cs:
>
> > @@ -35,9 +35,15 @@ public RepairIndicator(Actor building, string palettePrefix, Player player)
> >
> >  		public void Tick(World world)
> >  		{
> > -			if (!building.IsInWorld || building.IsDead() ||
> > -				rb.Repairer == null || rb.Repairer != player)
> > -				world.AddFrameEndTask(w => w.Remove(this));
> > +            var c = building.TraitOrDefault<Cloak>();
> > +
> > +            if ((!building.IsInWorld || building.IsDead() ||
> > +                rb.Repairer == null || rb.Repairer != player))
> > +                world.AddFrameEndTask(w => w.Remove(this));
> > +
> > +            // a seperate check to hide cloaked buildings being repaired from enemies
> > +            if (c != null && c.Cloaked && !player.IsAlliedWith(world.RenderPlayer))
> > +                world.AddFrameEndTask(w => w.Remove(this));
>
> This is going to behave badly if the building uncloaks while being
> repaired. It would be better to put the check in Render() to suppress the
> renderable generation.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/OpenRA/OpenRA/pull/3524/files#r5029282>
> .
>