Fix the ocean appearing even when the terrain height is greater than the water level.

This commit is contained in:
Relintai 2022-03-09 10:35:39 +01:00
parent 5e907a9267
commit 62990d5c9c

View File

@ -56,8 +56,8 @@ func _generate_terra_chunk_ocean(chunk: TerrainChunk, pseed : int, spawn_mobs: b
chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_LIQUID_TYPE, 0) chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_LIQUID_TYPE, 0)
chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_LIQUID_ISOLEVEL, 0) chunk.channel_ensure_allocated(TerrainChunkDefault.DEFAULT_CHANNEL_LIQUID_ISOLEVEL, 0)
chunk.set_voxel(water_surface_id, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_LIQUID_TYPE) chunk.set_voxel(water_surface_id, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_LIQUID_TYPE)
chunk.set_voxel(water_iso_level, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_LIQUID_ISOLEVEL) chunk.set_voxel(water_iso_level, x, z, TerrainChunkDefault.DEFAULT_CHANNEL_LIQUID_ISOLEVEL)
func get_base_iso_level() -> int: func get_base_iso_level() -> int:
return base_iso_level return base_iso_level