port: fix deformation-related vertex explosions on 64-bit

This commit is contained in:
fgsfds committed 2025-06-06 11:18:50 +02:00
1 parent 38cb1557d0
commit e8a69f39db
1 file changed
+4 -2
+4 -2
View File
@@ -58,14 +58,16 @@ void vtxstoreFixRefs(void *find, void *replacement)
struct modeldef *modeldef = model->definition; struct modeldef *modeldef = model->definition;
struct modelnode *node = modeldef->rootnode; struct modelnode *node = modeldef->rootnode;
struct modelrodata_dl *rodata; struct modelrodata_dl *rodata;
struct modelrwdata_dl *rwdata;
while (node) { while (node) {
switch (node->type & 0xff) { switch (node->type & 0xff) {
case MODELNODETYPE_DL: case MODELNODETYPE_DL:
rodata = &node->rodata->dl; rodata = &node->rodata->dl;
rwdata = (struct modelrwdata_dl *)&model->rwdatas[rodata->rwdataindex];
if (model->rwdatas[rodata->rwdataindex] == (uintptr_t) find) { if (rwdata->vertices == find) {
model->rwdatas[rodata->rwdataindex] = (uintptr_t) replacement; rwdata->vertices = replacement;
} }
break; break;
case MODELNODETYPE_DISTANCE: case MODELNODETYPE_DISTANCE: