forked from Ports/perfect_dark
port: fix deformation-related vertex explosions on 64-bit
This commit is contained in:
1 parent
38cb1557d0
commit
e8a69f39db
1 file changed
+4
-2
+4
-2
@@ -58,14 +58,16 @@ void vtxstoreFixRefs(void *find, void *replacement)
|
||||
struct modeldef *modeldef = model->definition;
|
||||
struct modelnode *node = modeldef->rootnode;
|
||||
struct modelrodata_dl *rodata;
|
||||
struct modelrwdata_dl *rwdata;
|
||||
|
||||
while (node) {
|
||||
switch (node->type & 0xff) {
|
||||
case MODELNODETYPE_DL:
|
||||
rodata = &node->rodata->dl;
|
||||
rwdata = (struct modelrwdata_dl *)&model->rwdatas[rodata->rwdataindex];
|
||||
|
||||
if (model->rwdatas[rodata->rwdataindex] == (uintptr_t) find) {
|
||||
model->rwdatas[rodata->rwdataindex] = (uintptr_t) replacement;
|
||||
if (rwdata->vertices == find) {
|
||||
rwdata->vertices = replacement;
|
||||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
|
||||
Reference in new issue
Block a user