Cancel support power targeting if power cannot be activated.

This commit is contained in:
Paul Chote
2021-01-10 12:17:25 +00:00
committed by reaperrr
parent 02a2624bcc
commit e990a83b7a
5 changed files with 6 additions and 6 deletions

View File

@@ -106,7 +106,7 @@ namespace OpenRA.Mods.Common.Traits
void IOrderGenerator.Tick(World world)
{
// Cancel the OG if we can't use the power
if (!manager.Powers.ContainsKey(order))
if (!manager.Powers.TryGetValue(order, out var p) || !p.Active || !p.Ready)
world.CancelInputMode();
}