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:
@@ -267,7 +267,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
return;
|
||||
|
||||
selectedActors = world.Selection.Actors
|
||||
.Where(a => a.Owner == world.LocalPlayer && a.IsInWorld)
|
||||
.Where(a => a.Owner == world.LocalPlayer && a.IsInWorld && !a.IsDead)
|
||||
.ToArray();
|
||||
|
||||
attackMoveDisabled = !selectedActors.Any(a => a.Info.HasTraitInfo<AttackMoveInfo>() && a.Info.HasTraitInfo<AutoTargetInfo>());
|
||||
|
||||
Reference in New Issue
Block a user