Fixed left-click breaking build order.
This commit is contained in:
@@ -30,6 +30,7 @@ namespace OpenRa.Game
|
|||||||
var xy = GetWorldPos(mi);
|
var xy = GetWorldPos(mi);
|
||||||
if (mi.Button == MouseButtons.Left && mi.Event == MouseInputEvent.Down)
|
if (mi.Button == MouseButtons.Left && mi.Event == MouseInputEvent.Down)
|
||||||
{
|
{
|
||||||
|
if (!(orderGenerator is PlaceBuilding))
|
||||||
dragStart = dragEnd = xy;
|
dragStart = dragEnd = xy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,11 +39,14 @@ namespace OpenRa.Game
|
|||||||
dragEnd = GetWorldPos(mi);
|
dragEnd = GetWorldPos(mi);
|
||||||
|
|
||||||
if (mi.Button == MouseButtons.Left && mi.Event == MouseInputEvent.Up)
|
if (mi.Button == MouseButtons.Left && mi.Event == MouseInputEvent.Up)
|
||||||
|
{
|
||||||
|
if (!(orderGenerator is PlaceBuilding))
|
||||||
{
|
{
|
||||||
if (dragStart.HasValue && !(dragStart.Value == GetWorldPos(mi)))
|
if (dragStart.HasValue && !(dragStart.Value == GetWorldPos(mi)))
|
||||||
orderGenerator = FindUnit(dragStart.Value, xy); /* band-box select */
|
orderGenerator = FindUnit(dragStart.Value, xy); /* band-box select */
|
||||||
else
|
else
|
||||||
orderGenerator = FindUnit(xy, xy); /* click select */
|
orderGenerator = FindUnit(xy, xy); /* click select */
|
||||||
|
}
|
||||||
|
|
||||||
dragStart = dragEnd = null;
|
dragStart = dragEnd = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user