Merge pull request #6691 from pchote/objective-duplication

Fix closure issue with mission objectives.
This commit is contained in:
Matthias Mailänder
2014-10-06 20:58:18 +02:00

View File

@@ -53,8 +53,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{
parent.RemoveChildren();
foreach (var objective in mo.Objectives.OrderBy(o => o.Type))
foreach (var o in mo.Objectives.OrderBy(o => o.Type))
{
var objective = o; // Work around the loop closure issue in older versions of C#
var widget = template.Clone();
var label = widget.Get<LabelWidget>("OBJECTIVE_TYPE");