Skip to content

Commit 6af3aa5

Browse files
committed
Merge pull request #107985 from simpkins/lods_bug
Fix `RenderingServer::mesh_surface_get_lods()`
2 parents 3071b98 + ad4dff7 commit 6af3aa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

servers/rendering_server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ Dictionary RenderingServer::mesh_surface_get_lods(RID p_mesh, int p_surface) con
17311731
const uint16_t *rptr = (const uint16_t *)r;
17321732
int *w = lods.ptrw();
17331733
for (uint32_t j = 0; j < lc; j++) {
1734-
w[j] = rptr[i];
1734+
w[j] = rptr[j];
17351735
}
17361736
} else {
17371737
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
17401740
const uint32_t *rptr = (const uint32_t *)r;
17411741
int *w = lods.ptrw();
17421742
for (uint32_t j = 0; j < lc; j++) {
1743-
w[j] = rptr[i];
1743+
w[j] = rptr[j];
17441744
}
17451745
}
17461746

0 commit comments

Comments
 (0)