From c63adbaf2b9dfc52e5a667deb3072fd9043f2482 Mon Sep 17 00:00:00 2001 From: Synis Date: Thu, 11 Mar 2021 23:40:31 +0100 Subject: [PATCH] Addressed comments --- world/src/site2/plot/castle.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/world/src/site2/plot/castle.rs b/world/src/site2/plot/castle.rs index f5e082267a..e4459bda6f 100644 --- a/world/src/site2/plot/castle.rs +++ b/world/src/site2/plot/castle.rs @@ -23,10 +23,10 @@ impl Castle { ) -> Self { let alt = SQUARE_4 .iter() - .map(|corner| tile_aabr.min + (tile_aabr.max - tile_aabr.min) * corner) + .map(|corner| tile_aabr.min + (tile_aabr.max - tile_aabr.min - 1) * corner) .map(|pos| land.get_alt_approx(site.tile_center_wpos(pos)) as i32) - .map(|val| val / 4) - .sum(); + .sum::() + / 4; Self { tile_aabr, @@ -42,6 +42,7 @@ impl Castle { } impl Structure for Castle { + #[allow(clippy::identity_op)] fn render Id, G: FnMut(Id, Fill)>( &self, site: &Site,