mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-14 23:58:26 +02:00
Only build the chunk in TerrainWorld::chunk_add() if the world is in the tree.
This commit is contained in:
parent
d99577365c
commit
97380e3f53
@ -352,7 +352,9 @@ void TerrainWorld::chunk_add(Ref<TerrainChunk> chunk, const int x, const int z)
|
||||
if (!chunk->get_is_terrain_generated()) {
|
||||
generation_queue_add_to(chunk);
|
||||
} else {
|
||||
chunk->build();
|
||||
if (is_inside_tree()) {
|
||||
chunk->build();
|
||||
}
|
||||
}
|
||||
}
|
||||
bool TerrainWorld::chunk_has(const int x, const int z) const {
|
||||
|
Loading…
Reference in New Issue
Block a user