Disable unit selection by double-clicking for enemy units
This commit is contained in:
@@ -109,11 +109,14 @@ namespace OpenRA.Widgets
|
||||
var unit = World.ScreenMap.ActorsAt(xy)
|
||||
.WithHighestSelectionPriority();
|
||||
|
||||
if (unit != null && unit.Owner == (World.RenderPlayer ?? World.LocalPlayer))
|
||||
{
|
||||
var newSelection2 = SelectActorsInBox(World, worldRenderer.Viewport.TopLeft, worldRenderer.Viewport.BottomRight,
|
||||
a => unit != null && a.Info.Name == unit.Info.Name && a.Owner == unit.Owner);
|
||||
a => a.Owner == unit.Owner && a.Info.Name == unit.Info.Name);
|
||||
|
||||
World.Selection.Combine(World, newSelection2, true, false);
|
||||
}
|
||||
}
|
||||
else if (dragStart.HasValue)
|
||||
{
|
||||
var newSelection = SelectActorsInBoxWithDeadzone(World, dragStart.Value, xy, _ => true);
|
||||
|
||||
Reference in New Issue
Block a user