mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-14 20:00:07 +01:00
Reset the mesher's lod index in _reset() in TerrainTerrainJob. This fixes subsequent mesh generations.
This commit is contained in:
parent
2024a33ee9
commit
39cb3e398f
@ -307,10 +307,11 @@ void TerrainTerrainJob::phase_terrain_mesh() {
|
||||
}
|
||||
|
||||
//allocate
|
||||
if (count > 0)
|
||||
if (count > 0) {
|
||||
chunk->meshes_create(TerrainChunkDefault::MESH_INDEX_TERRAIN, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (; _current_job_step < _job_steps.size();) {
|
||||
Ref<TerrainMesherJobStep> step = _job_steps[_current_job_step];
|
||||
@ -438,6 +439,7 @@ void TerrainTerrainJob::_reset() {
|
||||
ERR_FAIL_COND(!_mesher.is_valid());
|
||||
|
||||
_mesher->set_voxel_scale(_chunk->get_voxel_scale());
|
||||
_mesher->set_lod_index(0);
|
||||
|
||||
Ref<TerrainChunkDefault> chunk = _chunk;
|
||||
Ref<TerrainMesherDefault> md = _mesher;
|
||||
@ -458,9 +460,10 @@ void TerrainTerrainJob::_reset() {
|
||||
}
|
||||
|
||||
void TerrainTerrainJob::_physics_process(float delta) {
|
||||
if (_phase == 4)
|
||||
if (_phase == 4) {
|
||||
phase_physics_process();
|
||||
}
|
||||
}
|
||||
|
||||
void TerrainTerrainJob::step_type_normal() {
|
||||
Ref<TerrainChunkDefault> chunk = _chunk;
|
||||
|
Loading…
Reference in New Issue
Block a user