Fix #3354: Guard queries trait from destroyed object
This commit is contained in:
@@ -150,7 +150,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
|
||||
bool PerformGuard()
|
||||
{
|
||||
var actors = World.Selection.Actors.Where(a => a.Owner == World.LocalPlayer && a.HasTrait<Guard>());
|
||||
var actors = World.Selection.Actors.Where(a => !a.Destroyed && a.Owner == World.LocalPlayer && a.HasTrait<Guard>());
|
||||
|
||||
if (actors.Any())
|
||||
World.OrderGenerator = new GuardOrderGenerator(actors);
|
||||
|
||||
Reference in New Issue
Block a user