Skip to content

Commit

Permalink
fixed 850 -- rallypoint flags staying original owner's color after ca…
Browse files Browse the repository at this point in the history
…pture
  • Loading branch information
chrisforbes committed May 30, 2011
1 parent 368468e commit 5531715
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions OpenRA.Mods.RA/Effects/RallyPoint.cs
Expand Up @@ -12,7 +12,6 @@
using System.Linq;
using OpenRA.Effects;
using OpenRA.Graphics;
using OpenRA.Mods.RA;
using OpenRA.Traits;

namespace OpenRA.Mods.RA.Effects
Expand All @@ -23,13 +22,11 @@ class RallyPoint : IEffect
RA.RallyPoint rp;
public Animation flag = new Animation("rallypoint");
public Animation circles = new Animation("rallypoint");
readonly string palette;


public RallyPoint(Actor building)
{
this.building = building;
rp = building.Trait<RA.RallyPoint>();
palette = building.Trait<RenderSimple>().Palette(building.Owner);
flag.PlayRepeating("flag");
circles.Play("circles");
}
Expand All @@ -51,9 +48,12 @@ public void Tick( World world )

public IEnumerable<Renderable> Render()
{
if (building.IsInWorld && building.Owner == building.World.LocalPlayer && building.World.Selection.Actors.Contains(building))
if (building.IsInWorld && building.Owner == building.World.LocalPlayer
&& building.World.Selection.Actors.Contains(building))
{
var pos = Traits.Util.CenterOfCell(rp.rallyPoint);
var palette = building.Trait<RenderSimple>().Palette(building.Owner);

yield return new Renderable(circles.Image,
pos - .5f * circles.Image.size,
palette, (int)pos.Y);
Expand Down

0 comments on commit 5531715

Please sign in to comment.