mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-21 13:16:49 +01:00
Now the dungeon gets generated properly at any y coordinate. Set it to -50.
This commit is contained in:
parent
6044d301c1
commit
e95f5ac67e
@ -106,8 +106,6 @@ func _setup():
|
||||
#
|
||||
# add_dungeon_start_room(dung)
|
||||
|
||||
posy = 5
|
||||
|
||||
build()
|
||||
|
||||
func _setup_library(library):
|
||||
@ -129,9 +127,6 @@ func _generate_chunk(chunk, spawn_mobs):
|
||||
if !aabb.intersects(chunk_aabb):
|
||||
return
|
||||
|
||||
if chunk.position_y != 0:
|
||||
return
|
||||
|
||||
var px : int = chunk.position_x * chunk.size_x - posx
|
||||
var pz : int = chunk.position_z * chunk.size_z - posz
|
||||
|
||||
@ -150,6 +145,12 @@ func _generate_chunk(chunk, spawn_mobs):
|
||||
var draw_floor : bool = true
|
||||
var draw_ceiling : bool = true
|
||||
|
||||
if floor_pos > chunk.size_y:
|
||||
return
|
||||
|
||||
if ceiling_pos < 0:
|
||||
return
|
||||
|
||||
if floor_pos < 0:
|
||||
floor_pos = 0
|
||||
draw_floor = false
|
||||
|
@ -13,6 +13,7 @@
|
||||
[ext_resource path="res://modules/planets/test_planet/voxel_library/textures/stone_dungeon_1_albedo.png" type="Texture" id=11]
|
||||
|
||||
[resource]
|
||||
posy = -50
|
||||
sizex = 40
|
||||
sizey = 3
|
||||
sizez = 40
|
||||
|
Loading…
Reference in New Issue
Block a user