Let order generators account for selection changes

This commit is contained in:
abcdefg30
2020-05-22 11:21:57 +02:00
committed by Paul Chote
parent b5e3f25418
commit 07d58337f1
12 changed files with 63 additions and 24 deletions

View File

@@ -10,6 +10,7 @@
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Cnc.Activities;
using OpenRA.Mods.Common.Graphics;
@@ -209,9 +210,9 @@ namespace OpenRA.Mods.Cnc.Traits
}
}
protected override void Tick(World world)
protected override void SelectionChanged(World world, IEnumerable<Actor> selected)
{
if (!self.IsInWorld || self.IsDead)
if (!selected.Contains(self))
world.CancelInputMode();
}