diff --git a/OpenRA.Mods.Common/EditorBrushes/EditorTilingPathBrush.cs b/OpenRA.Mods.Common/EditorBrushes/EditorTilingPathBrush.cs index 908d6b99f7..a0f566adc6 100644 --- a/OpenRA.Mods.Common/EditorBrushes/EditorTilingPathBrush.cs +++ b/OpenRA.Mods.Common/EditorBrushes/EditorTilingPathBrush.cs @@ -106,10 +106,12 @@ namespace OpenRA.Mods.Common.Widgets var isInside = points.Select(p => p.CPos).Contains(cpos); var isRally = plan.Rallies.Contains(cpos); var rallyIndex = - points - .Where(p => p.CPos == cpos) - .Select(p => p.RallyIndex) - .FirstOrDefault(0); + isRally + ? plan.Rallies.TakeWhile(r => r != cpos).Count() + : points + .Where(p => p.CPos == cpos) + .Select(p => p.RallyIndex) + .FirstOrDefault(0); var isStartDirector = plan.AutoStart != Direction.None && cpos == plan.FirstPoint - plan.AutoStart.ToCVec();