From c0efcbef7166ce3ef3049b2f87ad55309f04a0c6 Mon Sep 17 00:00:00 2001 From: dawnDus <96957561+dawndus@users.noreply.github.com> Date: Sun, 13 Mar 2022 17:45:21 -0400 Subject: [PATCH] Slight changes to water fill logic --- src/map.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/map.rs b/src/map.rs index 10af5d4..949d1d8 100644 --- a/src/map.rs +++ b/src/map.rs @@ -440,7 +440,14 @@ impl Map { bounds, color_idx, )); - length = 0; + if x == max_x - 1 { + length = 1; + let attr_up = + if rect.top > 0 { self.get_attribute(x as usize + 1, line_up as usize) } else { 0x41 }; + make_water_line = !SOLID_TILES.contains(&attr_up) && !WATER_TILES.contains(&attr_up); + } else { + length = 0; + } } else { length = 0; }