Skip to content

Commit

Permalink
bug fixed: water couldn't be seen from low ground
Browse files Browse the repository at this point in the history
  • Loading branch information
soundmud committed Aug 1, 2020
1 parent 46adf6b commit 2d4f4a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions soundrts/worldunit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2d4f4a5

Please sign in to comment.