Fixed left-click orders and implemented a selection deadzone.
This commit is contained in:
@@ -146,7 +146,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
public IEnumerable<Order> Order(World world, CPos xy, MouseInput mi)
|
||||
{
|
||||
if (mi.Button == Game.mouseButtonPreference.Cancel)
|
||||
if (mi.Button == Game.Settings.Game.MouseButtonPreference.Cancel)
|
||||
{
|
||||
world.CancelInputMode();
|
||||
yield break;
|
||||
@@ -157,7 +157,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
.MaxByOrDefault(a => a.Info.Traits.Contains<SelectableInfo>()
|
||||
? a.Info.Traits.Get<SelectableInfo>().Priority : int.MinValue);
|
||||
|
||||
if (mi.Button == Game.mouseButtonPreference.Action && underCursor == null)
|
||||
if (mi.Button == Game.Settings.Game.MouseButtonPreference.Action && underCursor == null)
|
||||
{
|
||||
minelayer.World.CancelInputMode();
|
||||
yield return new Order("PlaceMinefield", minelayer, false) { TargetLocation = xy };
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
public IEnumerable<Order> Order(World world, CPos xy, MouseInput mi)
|
||||
{
|
||||
if (mi.Button == Game.mouseButtonPreference.Cancel)
|
||||
if (mi.Button == Game.Settings.Game.MouseButtonPreference.Cancel)
|
||||
{
|
||||
world.CancelInputMode();
|
||||
yield break;
|
||||
|
||||
Reference in New Issue
Block a user