diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/CommandBarLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/CommandBarLogic.cs index b1d640b53c..3c47162b04 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/CommandBarLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/CommandBarLogic.cs @@ -114,8 +114,7 @@ namespace OpenRA.Mods.Common.Widgets BindButtonIcon(guardButton); guardButton.IsDisabled = () => { UpdateStateIfNecessary(); return guardDisabled; }; - guardButton.IsHighlighted = () => world.OrderGenerator is GenericSelectTarget - && ((GenericSelectTarget)world.OrderGenerator).OrderName == "Guard"; + guardButton.IsHighlighted = () => world.OrderGenerator is GuardOrderGenerator; Action toggle = allowCancel => {