Refactor DemoTruck/Chronoshiftable inheritance

This commit is contained in:
Paul Chote
2010-01-07 00:48:50 +13:00
parent bac4db504c
commit 64214fd97b
4 changed files with 12 additions and 21 deletions

View File

@@ -24,7 +24,7 @@ namespace OpenRa.Game.Orders
var loc = mi.Location + Game.viewport.Location;
var underCursor = Game.FindUnits(loc, loc)
.Where(a => a.Owner == Game.LocalPlayer
&& a.traits.WithInterface<IChronoshiftable>().Any()
&& a.traits.WithInterface<Chronoshiftable>().Any()
&& a.Info.Selectable).FirstOrDefault();
var unit = underCursor != null ? underCursor.Info as UnitInfo : null;