diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 68cfee2a41..bcd3b94b09 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -200,6 +200,7 @@ + diff --git a/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs b/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs index ffc5ea7b09..ae7de0551f 100644 --- a/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs +++ b/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs @@ -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.Contains() + && a.traits.WithInterface().Any() && a.Info.Selectable).FirstOrDefault(); var unit = underCursor != null ? underCursor.Info as UnitInfo : null; diff --git a/OpenRa.Game/Traits/Chronoshiftable.cs b/OpenRa.Game/Traits/Chronoshiftable.cs index 1427cb39d1..bf97b15542 100644 --- a/OpenRa.Game/Traits/Chronoshiftable.cs +++ b/OpenRa.Game/Traits/Chronoshiftable.cs @@ -6,7 +6,7 @@ using System.Drawing; namespace OpenRa.Game.Traits { - class Chronoshiftable : IOrder, ISpeedModifier, ITick + class Chronoshiftable : IOrder, ISpeedModifier, ITick, IChronoshiftable { // Return-to-sender logic int2 chronoshiftOrigin; diff --git a/OpenRa.Game/Traits/TraitsInterfaces.cs b/OpenRa.Game/Traits/TraitsInterfaces.cs index e66744cb4e..fdf5a05cbd 100644 --- a/OpenRa.Game/Traits/TraitsInterfaces.cs +++ b/OpenRa.Game/Traits/TraitsInterfaces.cs @@ -43,7 +43,7 @@ namespace OpenRa.Game.Traits bool IsCrushableBy(UnitMovementType umt, Player player); bool IsPathableCrush(UnitMovementType umt, Player player); } - + interface IChronoshiftable{} struct Renderable { public readonly Sprite Sprite; diff --git a/aftermathUnits.ini b/aftermathUnits.ini index f48554b9d7..d352dc379c 100755 --- a/aftermathUnits.ini +++ b/aftermathUnits.ini @@ -23,7 +23,7 @@ Voice=VehicleVoice [DTRK] Description=Demo Truck -Traits=Unit, Mobile, AttackBase, RenderUnit, Chronoshiftable +Traits=Unit, Mobile, AttackBase, RenderUnit, DemoTruck Voice=VehicleVoice [QTNK]