mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add more water checks.
Not sure if necessary or just paranoia.
This commit is contained in:
parent
339d6f2a3b
commit
1ae93ee00e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user