diff --git a/CHANGELOG b/CHANGELOG index ede07e3ac0..014c926121 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,6 +57,7 @@ NEW: Filenames are now listed in alphabetical order Map Editor: Removed legacy INI/MPR map import. + Fixed being unable to use the flood fill tool on similar grass/snow/desert tiles. Utility: Added an improved INI/MPR map import. Mod / Custom map compatibility: diff --git a/OpenRA.Editor/BrushTool.cs b/OpenRA.Editor/BrushTool.cs index 5139eac0eb..d094d508a1 100644 --- a/OpenRA.Editor/BrushTool.cs +++ b/OpenRA.Editor/BrushTool.cs @@ -88,7 +88,7 @@ namespace OpenRA.Editor while (queue.Count > 0) { var p = queue.Dequeue(); - if (!s.Map.MapTiles.Value[p.X, p.Y].Equals(replace)) + if (s.Map.MapTiles.Value[p.X, p.Y].Type != replace.Type) continue; var a = FindEdge(s, p, new CVec(-1, 0), replace); @@ -97,9 +97,9 @@ namespace OpenRA.Editor for (var x = a.X; x <= b.X; x++) { s.Map.MapTiles.Value[x, p.Y] = new TileReference { Type = brushTemplate.N, Index = (byte)0 }; - if (s.Map.MapTiles.Value[x, p.Y - 1].Equals(replace)) + if (s.Map.MapTiles.Value[x, p.Y - 1].Type == replace.Type) maybeEnqueue(x, p.Y - 1); - if (s.Map.MapTiles.Value[x, p.Y + 1].Equals(replace)) + if (s.Map.MapTiles.Value[x, p.Y + 1].Type == replace.Type) maybeEnqueue(x, p.Y + 1); } } @@ -115,7 +115,7 @@ namespace OpenRA.Editor { var q = p + d; if (!s.Map.IsInMap(q)) return p; - if (!s.Map.MapTiles.Value[q.X, q.Y].Equals(replace)) return p; + if (s.Map.MapTiles.Value[q.X, q.Y].Type != replace.Type) return p; p = q; } }