mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-22 10:57:30 +01:00
Improved aborting chunk build.
This commit is contained in:
parent
59291a9417
commit
f9d13c611f
@ -646,18 +646,18 @@ void VoxelChunk::build_prioritized() {
|
|||||||
void VoxelChunk::_build_step() {
|
void VoxelChunk::_build_step() {
|
||||||
ERR_FAIL_COND(!has_next_phase());
|
ERR_FAIL_COND(!has_next_phase());
|
||||||
|
|
||||||
while (has_next_phase() && build_phase())
|
while (has_next_phase() && build_phase() && !_abort_build)
|
||||||
;
|
;
|
||||||
|
|
||||||
//call the next non-threaded phase aswell
|
//call the next non-threaded phase aswell
|
||||||
if (has_next_phase())
|
if (has_next_phase() && !_abort_build)
|
||||||
build_phase();
|
build_phase();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoxelChunk::_build_threaded(void *_userdata) {
|
void VoxelChunk::_build_threaded(void *_userdata) {
|
||||||
VoxelChunk *vc = (VoxelChunk *)_userdata;
|
VoxelChunk *vc = (VoxelChunk *)_userdata;
|
||||||
|
|
||||||
while (vc->has_next_phase() && vc->build_phase())
|
while (vc->has_next_phase() && vc->build_phase() && !vc->_abort_build)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user