diff --git a/modules/terraman/world/jobs/terrain_prop_job.cpp b/modules/terraman/world/jobs/terrain_prop_job.cpp index d2da717aa..a75adf7e7 100644 --- a/modules/terraman/world/jobs/terrain_prop_job.cpp +++ b/modules/terraman/world/jobs/terrain_prop_job.cpp @@ -550,14 +550,6 @@ void TerrainPropJob::step_type_bake_texture() { VisualServer::get_singleton()->mesh_add_surface_from_arrays(mesh_rid, VisualServer::PRIMITIVE_TRIANGLES, temp_mesh_arr); - Ref lmat; - - if (chunk->prop_material_cache_key_has()) { - lmat = chunk->get_library()->prop_material_cache_get(_chunk->prop_material_cache_key_get())->material_lod_get(_current_mesh); - } else { - lmat = chunk->get_library()->prop_material_lod_get(_current_mesh); - } - if (lmat.is_valid()) { VisualServer::get_singleton()->mesh_surface_set_material(mesh_rid, 0, lmat->get_rid()); } diff --git a/modules/terraman/world/jobs/terrain_terrain_job.cpp b/modules/terraman/world/jobs/terrain_terrain_job.cpp index f4a89eb97..a6a71a6bf 100644 --- a/modules/terraman/world/jobs/terrain_terrain_job.cpp +++ b/modules/terraman/world/jobs/terrain_terrain_job.cpp @@ -624,14 +624,6 @@ void TerrainTerrainJob::step_type_bake_texture() { VisualServer::get_singleton()->mesh_add_surface_from_arrays(mesh_rid, VisualServer::PRIMITIVE_TRIANGLES, temp_mesh_arr); - Ref lmat; - - if (chunk->material_cache_key_has()) { - lmat = chunk->get_library()->material_cache_get(_chunk->material_cache_key_get())->material_lod_get(_current_mesh); - } else { - lmat = chunk->get_library()->material_lod_get(_current_mesh); - } - if (lmat.is_valid()) { VisualServer::get_singleton()->mesh_surface_set_material(mesh_rid, 0, lmat->get_rid()); } diff --git a/modules/voxelman/world/jobs/voxel_prop_job.cpp b/modules/voxelman/world/jobs/voxel_prop_job.cpp index d92accf93..c7b43c5ae 100644 --- a/modules/voxelman/world/jobs/voxel_prop_job.cpp +++ b/modules/voxelman/world/jobs/voxel_prop_job.cpp @@ -551,14 +551,6 @@ void VoxelPropJob::step_type_bake_texture() { VisualServer::get_singleton()->mesh_add_surface_from_arrays(mesh_rid, VisualServer::PRIMITIVE_TRIANGLES, temp_mesh_arr); - Ref lmat; - - if (chunk->prop_material_cache_key_has()) { - lmat = chunk->get_library()->prop_material_cache_get(_chunk->prop_material_cache_key_get())->material_lod_get(_current_mesh); - } else { - lmat = chunk->get_library()->prop_material_lod_get(_current_mesh); - } - if (lmat.is_valid()) { VisualServer::get_singleton()->mesh_surface_set_material(mesh_rid, 0, lmat->get_rid()); }