clean up dumb mess of exit-flags in WorldInteractionControllerWidget
This commit is contained in:
@@ -102,19 +102,13 @@ namespace OpenRA.Widgets
|
|||||||
orders.Do( o => world.IssueOrder( o ) );
|
orders.Do( o => world.IssueOrder( o ) );
|
||||||
|
|
||||||
// Find an actor with a phrase to say
|
// Find an actor with a phrase to say
|
||||||
var done = false;
|
|
||||||
foreach (var o in orders)
|
foreach (var o in orders)
|
||||||
{
|
{
|
||||||
if (o.Subject.Destroyed) continue;
|
if (o.Subject.Destroyed) continue;
|
||||||
foreach (var v in o.Subject.TraitsImplementing<IOrderVoice>())
|
foreach (var v in o.Subject.TraitsImplementing<IOrderVoice>())
|
||||||
{
|
if (Sound.PlayVoice(v.VoicePhraseForOrder(o.Subject, o),
|
||||||
if (Sound.PlayVoice(v.VoicePhraseForOrder(o.Subject, o), o.Subject, o.Subject.Owner.Country.Race))
|
o.Subject, o.Subject.Owner.Country.Race))
|
||||||
{
|
return;
|
||||||
done = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (done) break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user