Move selectableActor check inside InputOverridesSelection.

This commit is contained in:
Paul Chote
2020-03-25 23:55:29 +00:00
committed by reaperrr
parent e2572b214f
commit 2c7a56625c
2 changed files with 7 additions and 13 deletions

View File

@@ -96,7 +96,7 @@ namespace OpenRA.Orders
public virtual bool InputOverridesSelection(World world, int2 xy, MouseInput mi)
{
var actor = world.ScreenMap.ActorsAtMouse(xy)
.Where(a => !a.Actor.IsDead)
.Where(a => !a.Actor.IsDead && a.Actor.Info.HasTraitInfo<ISelectableInfo>() && (a.Actor.Owner.IsAlliedWith(world.RenderPlayer) || !world.FogObscures(a.Actor)))
.WithHighestSelectionPriority(xy, mi.Modifiers);
if (actor == null)