clean up dumb mess of exit-flags in WorldInteractionControllerWidget

This commit is contained in:
Chris Forbes
2011-03-06 10:15:31 +13:00
parent d2d425731f
commit 1a6ff61836

View File

@@ -102,19 +102,13 @@ namespace OpenRA.Widgets
orders.Do( o => world.IssueOrder( o ) );
// Find an actor with a phrase to say
var done = false;
foreach (var o in orders)
{
if (o.Subject.Destroyed) continue;
foreach (var v in o.Subject.TraitsImplementing<IOrderVoice>())
{
if (Sound.PlayVoice(v.VoicePhraseForOrder(o.Subject, o), o.Subject, o.Subject.Owner.Country.Race))
{
done = true;
break;
}
}
if (done) break;
if (Sound.PlayVoice(v.VoicePhraseForOrder(o.Subject, o),
o.Subject, o.Subject.Owner.Country.Race))
return;
}
}