mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-14 10:17:20 +01:00
Allow the level generator to be null, without failing.
This commit is contained in:
parent
a34ceedf6a
commit
efd08f69bf
@ -757,9 +757,9 @@ VoxelWorld ::~VoxelWorld() {
|
||||
|
||||
void VoxelWorld::_generate_chunk(Ref<VoxelChunk> chunk) {
|
||||
ERR_FAIL_COND(!chunk.is_valid());
|
||||
ERR_FAIL_COND(!_level_generator.is_valid());
|
||||
|
||||
_level_generator->generate_chunk(chunk);
|
||||
if (_level_generator.is_valid())
|
||||
_level_generator->generate_chunk(chunk);
|
||||
|
||||
for (int i = 0; i < _voxel_structures.size(); ++i) {
|
||||
Ref<VoxelStructure> structure = _voxel_structures.get(i);
|
||||
|
Loading…
Reference in New Issue
Block a user