From 8efa7a143e8517dcfeb8320e403cce76ec9eba56 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 31 Mar 2016 20:54:51 +0100 Subject: [PATCH] Add ExpectedButton check to GuardOrderGenerator. --- OpenRA.Mods.Common/Orders/GuardOrderGenerator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Orders/GuardOrderGenerator.cs b/OpenRA.Mods.Common/Orders/GuardOrderGenerator.cs index 6a28d40c74..3fa9b58953 100644 --- a/OpenRA.Mods.Common/Orders/GuardOrderGenerator.cs +++ b/OpenRA.Mods.Common/Orders/GuardOrderGenerator.cs @@ -23,8 +23,10 @@ namespace OpenRA.Mods.Common.Orders protected override IEnumerable OrderInner(World world, CPos xy, MouseInput mi) { - var target = FriendlyGuardableUnits(world, mi).FirstOrDefault(); + if (mi.Button != ExpectedButton) + yield break; + var target = FriendlyGuardableUnits(world, mi).FirstOrDefault(); if (target == null || Subjects.All(s => s.IsDead)) yield break;