Merge branch 'fix-ghost-checks' into 'master'

Use correct ziptic size parsing RA ghosts

See merge request KartKrew/Kart!989
This commit is contained in:
toaster 2023-02-28 11:33:05 +00:00
commit 5ee9b9d5b6

View file

@ -1184,7 +1184,7 @@ void G_GhostTicker(void)
for(g = ghosts, p = NULL; g; g = g->next) for(g = ghosts, p = NULL; g; g = g->next)
{ {
// Skip normal demo data. // Skip normal demo data.
UINT8 ziptic = READUINT8(g->p); UINT16 ziptic = READUINT8(g->p);
UINT8 xziptic = 0; UINT8 xziptic = 0;
while (ziptic != DW_END) // Get rid of extradata stuff while (ziptic != DW_END) // Get rid of extradata stuff
@ -1225,12 +1225,14 @@ void G_GhostTicker(void)
ziptic = READUINT8(g->p); ziptic = READUINT8(g->p);
} }
ziptic = READUINT8(g->p); ziptic = READUINT16(g->p);
if (ziptic & ZT_FWD) if (ziptic & ZT_FWD)
g->p++; g->p++;
if (ziptic & ZT_TURNING) if (ziptic & ZT_TURNING)
g->p += 2; g->p += 2;
if (ziptic & ZT_ANGLE)
g->p += 2;
if (ziptic & ZT_THROWDIR) if (ziptic & ZT_THROWDIR)
g->p += 2; g->p += 2;
if (ziptic & ZT_BUTTONS) if (ziptic & ZT_BUTTONS)