Add more water checks.

Not sure if necessary or just paranoia.
This commit is contained in:
Tormod G. Hellen 2022-02-16 02:07:49 +01:00
parent 339d6f2a3b
commit 1ae93ee00e

View File

@ -1010,6 +1010,11 @@ fn loc_suitable_for_site(sim: &WorldSim, loc: Vec2<i32>, site_kind: SiteKind) ->
!chunk.river.is_ocean()
&& !chunk.river.is_lake()
&& !chunk.river.is_river()
&& !chunk.is_underwater()
&& !matches!(
chunk.get_biome(),
common::terrain::BiomeKind::Lake | common::terrain::BiomeKind::Ocean
)
&& sim
.get_gradient_approx(loc)
.map(|grad| grad < 1.0)