Begin imposing sanity on order ordering

This commit is contained in:
Paul Chote
2010-09-12 18:10:34 +12:00
parent 1bc2136771
commit 2b6328f0ee
21 changed files with 108 additions and 14 deletions

View File

@@ -121,7 +121,8 @@ namespace OpenRA
.OrderByDescending(a => a.Info.Traits.Contains<SelectableInfo>() ? a.Info.Traits.Get<SelectableInfo>().Priority : int.MinValue)
.FirstOrDefault();
return TraitsImplementing<IIssueOrder>()
return TraitsImplementing<IIssueOrder>()
.OrderByDescending( x => x.OrderPriority( this, xy, mi, underCursor ) )
.Select( x => x.IssueOrder( this, xy, mi, underCursor ) )
.FirstOrDefault( x => x != null );
}