Prevent attack move crashing if selected actors die.
- Cancel attack move if all actors die. - Command bar no longer shows available actions from any dead units.
This commit is contained in:
@@ -165,6 +165,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
public override void Tick(World world)
|
||||
{
|
||||
if (subjects.All(s => s.Actor.IsDead))
|
||||
world.CancelInputMode();
|
||||
}
|
||||
|
||||
public override string GetCursor(World world, CPos cell, int2 worldPixel, MouseInput mi)
|
||||
{
|
||||
var prefix = mi.Modifiers.HasModifier(Modifiers.Ctrl) ? "assaultmove" : "attackmove";
|
||||
|
||||
Reference in New Issue
Block a user