From 7666ccf2c7e818dfd3e3cbeb2d9959010f9aa5d0 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Tue, 15 Aug 2023 00:49:35 +0200 Subject: [PATCH] port: fix muzzle flashes on some guns --- port/src/preprocess.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/port/src/preprocess.c b/port/src/preprocess.c index 66ab08452..df52c66dd 100644 --- a/port/src/preprocess.c +++ b/port/src/preprocess.c @@ -341,13 +341,19 @@ static void preprocessModelNode(struct modelnode *node, u8 *base, u32 ofs) break; case MODELNODETYPE_STARGUNFIRE: PD_SWAP_VAL(ro->stargunfire.unk00); - PD_SWAP_PTR(ro->stargunfire.vertices); PD_SWAP_PTR(ro->stargunfire.baseaddr); if (ro->stargunfire.gdl) { PD_SWAP_PTR(ro->stargunfire.gdl); preprocessGfx(PD_PTR_BASEOFS(ro->stargunfire.gdl, base, ofs), base, ofs); ro->stargunfire.gdl = SEGADDR(ro->stargunfire.gdl); } + if (ro->stargunfire.vertices) { + PD_SWAP_PTR(ro->stargunfire.vertices); + Vtx *vtx = PD_PTR_BASEOFS(ro->stargunfire.vertices, base, ofs); + for (s32 i = 0; i < 4 * ro->stargunfire.unk00; ++i, ++vtx) { + preprocessVtx(vtx); + } + } break; case MODELNODETYPE_HEADSPOT: PD_SWAP_VAL(ro->headspot.rwdataindex);