From 987b6939d851044d2cae86575d986fd51f5af7f9 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 1 Jan 2010 18:59:22 +1300 Subject: [PATCH] only select one unit when clicking rather than dragging --- OpenRa.Game/Controller.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenRa.Game/Controller.cs b/OpenRa.Game/Controller.cs index 4626ac4a5d..a850cbd9e7 100644 --- a/OpenRa.Game/Controller.cs +++ b/OpenRa.Game/Controller.cs @@ -95,10 +95,13 @@ namespace OpenRa.Game ? (orderGenerator as UnitOrderGenerator).selection : new Actor[] { }.AsEnumerable(); if (isClick) - orderGenerator = new UnitOrderGenerator(isCombine - ? oldSelection.SymmetricDifference(newSelection) : newSelection); + { + var adjNewSelection = newSelection.Take(1); /* todo: select BEST, not FIRST */ + orderGenerator = new UnitOrderGenerator(isCombine + ? oldSelection.SymmetricDifference(adjNewSelection) : adjNewSelection); + } else - orderGenerator = new UnitOrderGenerator(isCombine + orderGenerator = new UnitOrderGenerator(isCombine ? oldSelection.Union(newSelection) : newSelection); var voicedUnit = ((UnitOrderGenerator)orderGenerator).selection