Don't return in the terrain job if the cache is not initialized, wait instead.

This commit is contained in:
Relintai 2021-08-08 13:22:40 +02:00
parent 69284d9ebb
commit d931a53a13

View File

@ -108,16 +108,19 @@ void TerraTerrarinJob::phase_library_setup() {
return; return;
} }
if (!cache->get_initialized()) { while (!cache->get_initialized()) {
//Means it's currently merging the atlases on a different thread. //Means it's currently merging the atlases on a different thread.
//Let's just wait -> return. //Let's just wait
//This method will get called again later. OS::get_singleton()->delay_usec(100);
return;
} }
} }
} }
next_phase(); next_phase();
if (should_return()) {
return;
}
} }
void TerraTerrarinJob::phase_terrarin_mesh_setup() { void TerraTerrarinJob::phase_terrarin_mesh_setup() {