mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
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 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:
|
||||||
|
|||||||
Reference in new issue
Block a user