1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-01-01 08:37:42 +00:00

Slight changes to water fill logic

This commit is contained in:
dawnDus 2022-03-13 17:45:21 -04:00
parent 2dadbdb905
commit c0efcbef71
No known key found for this signature in database
GPG key ID: 972AABDE81848F21

View file

@ -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;
}