Merge pull request #107985 from simpkins/lods_bug

Fix `RenderingServer::mesh_surface_get_lods()`
This commit is contained in:
Thaddeus Crews 2025-06-25 15:14:05 -05:00
commit 6af3aa54fd
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -1731,7 +1731,7 @@ Dictionary RenderingServer::mesh_surface_get_lods(RID p_mesh, int p_surface) con
const uint16_t *rptr = (const uint16_t *)r;
int *w = lods.ptrw();
for (uint32_t j = 0; j < lc; j++) {
w[j] = rptr[i];
w[j] = rptr[j];
}
} else {
uint32_t lc = sd.lods[i].index_data.size() / 4;
@ -1740,7 +1740,7 @@ Dictionary RenderingServer::mesh_surface_get_lods(RID p_mesh, int p_surface) con
const uint32_t *rptr = (const uint32_t *)r;
int *w = lods.ptrw();
for (uint32_t j = 0; j < lc; j++) {
w[j] = rptr[i];
w[j] = rptr[j];
}
}