From 2d4f4a51d5e791d4ab72cb080c805f254e439dc3 Mon Sep 17 00:00:00 2001 From: soundmud Date: Sat, 1 Aug 2020 14:38:27 +0200 Subject: [PATCH] bug fixed: water couldn't be seen from low ground --- soundrts/worldunit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/soundrts/worldunit.py b/soundrts/worldunit.py index 4b8c1b9a..9a03a0c6 100644 --- a/soundrts/worldunit.py +++ b/soundrts/worldunit.py @@ -204,8 +204,11 @@ def get_observed_squares(self, strict=False): if strict and self.sight_range < self.world.square_width: return result for sq in self.place.neighbors: - if self.height > sq.height \ - or self.height == sq.height and self._can_go(sq, ignore_forests=True): + if (self.height > sq.height + or self.height == sq.height and ( + self._can_go(sq, ignore_forests=True) + or sq.is_water + or self.place.is_water)): result.append(sq) return result