Spawn the correct mob.

This commit is contained in:
Relintai 2020-05-06 21:50:15 +02:00
parent d12d58d61b
commit 0c1ac31224

View File

@ -96,7 +96,7 @@ func generate_terrarin(chunk : VoxelChunk, spawn_mobs: bool) -> void:
# chunk.build() # chunk.build()
if not Engine.editor_hint and chunk.position_y == 0 and spawn_mobs: if not Engine.editor_hint and chunk.position_y == 0 and spawn_mobs:
ESS.entity_spawner.spawn_mob(1, randi() % 3, Vector3(chunk.position_x * chunk.size_x * chunk.voxel_scale + chunk.size_x / 2,\ ESS.entity_spawner.spawn_mob(0, randi() % 3, Vector3(chunk.position_x * chunk.size_x * chunk.voxel_scale + chunk.size_x / 2,\
(chunk.position_y + 1) * chunk.size_y * chunk.voxel_scale, \ (chunk.position_y + 1) * chunk.size_y * chunk.voxel_scale, \
chunk.position_z * chunk.size_z * chunk.voxel_scale + chunk.size_z / 2)) chunk.position_z * chunk.size_z * chunk.voxel_scale + chunk.size_z / 2))