Move selectableActor check inside InputOverridesSelection.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -117,12 +117,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
if (useClassicMouseStyle && HasMouseFocus)
|
||||
{
|
||||
if (!IsValidDragbox && World.Selection.Actors.Any() && !multiClick)
|
||||
{
|
||||
var selectableActor = World.ScreenMap.ActorsAtMouse(mousePos).Select(a => a.Actor).Any(x =>
|
||||
x.Info.HasTraitInfo<ISelectableInfo>() && (x.Owner.IsAlliedWith(World.RenderPlayer) || !World.FogObscures(x)));
|
||||
|
||||
if (!selectableActor || uog.InputOverridesSelection(World, mousePos, mi))
|
||||
if (!IsValidDragbox && World.Selection.Actors.Any() && !multiClick && uog.InputOverridesSelection(World, mousePos, mi))
|
||||
{
|
||||
// Order units instead of selecting
|
||||
ApplyOrders(World, mi);
|
||||
@@ -131,7 +126,6 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (multiClick)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user