selection persists across OG changes

This commit is contained in:
Chris Forbes
2010-02-08 19:05:49 +13:00
parent 853f9ae6d5
commit 37af0f2f04
4 changed files with 45 additions and 53 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using OpenRa.Graphics;
using OpenRa.Orders;
@@ -27,8 +28,7 @@ namespace OpenRa.Traits
public IEnumerable<Renderable> Render(Actor self)
{
var uog = Game.controller.orderGenerator as UnitOrderGenerator;
if (uog != null && self.Owner == self.World.LocalPlayer && uog.selection.Contains(self))
if (self.Owner == self.World.LocalPlayer && Game.controller.selection.Actors.Contains(self))
yield return Util.Centered(self,
anim.Image, Util.CenterOfCell(rallyPoint));
}