mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-14 23:58:26 +02:00
Also check whether chunks are building when doing a priority generation.
This commit is contained in:
parent
82218be991
commit
9289351284
@ -1584,6 +1584,8 @@ void TerrainWorld::_notification(int p_what) {
|
||||
case NOTIFICATION_INTERNAL_PROCESS: {
|
||||
_num_frame_chunk_build_steps = 0;
|
||||
|
||||
bool is_a_chunk_building = false;
|
||||
|
||||
for (int i = 0; i < _chunks_vector.size(); ++i) {
|
||||
Ref<TerrainChunk> chunk = _chunks_vector[i];
|
||||
|
||||
@ -1596,9 +1598,13 @@ void TerrainWorld::_notification(int p_what) {
|
||||
if (chunk->get_is_generating()) {
|
||||
chunk->generation_process(get_process_delta_time());
|
||||
}
|
||||
|
||||
if (chunk->get_is_generating()) {
|
||||
is_a_chunk_building = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (_is_priority_generation && _generation_queue.empty() && _generating.empty()) {
|
||||
if (_is_priority_generation && !is_a_chunk_building && _generation_queue.empty() && _generating.empty()) {
|
||||
_is_priority_generation = false;
|
||||
|
||||
call("_generation_finished");
|
||||
|
Loading…
Reference in New Issue
Block a user