Spawn mobs more sporadically.

This commit is contained in:
Relintai 2020-07-06 22:38:07 +02:00
parent 90be9898d9
commit f3169ccf82

View File

@ -27,7 +27,7 @@ func _generate_chunk(chunk: VoxelChunk, spawn_mobs: bool) -> void:
generate_simple_terrarin(chunk, spawn_mobs)
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 and randi() % 4 == 0:
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_z * chunk.size_z * chunk.voxel_scale + chunk.size_z / 2))