G_AddGhost, G_GetStaffGhostBrief: fix bugged unlockables code

This was causing the following crash:

    I_Error(): Ghost is not a record attack ghost DXD (ziptic = 1)
This commit is contained in:
James R 2024-03-05 02:56:34 -08:00
parent 50624546cc
commit e86ae4b22b

View file

@ -3591,7 +3591,7 @@ void G_AddGhost(savebuffer_t *buffer, const char *defdemoname)
// Skip unlockables
{
UINT32 unlockables = READUINT32(p);
p += std::min<UINT32>(unlockables, MAXUNLOCKABLES);
p += unlockables;
}
p++; // mapmusrng
@ -3814,7 +3814,7 @@ staffbrief_t *G_GetStaffGhostBrief(UINT8 *buffer)
// Skip unlockables
{
UINT32 unlockables = READUINT32(p);
p += std::min<UINT32>(unlockables, MAXUNLOCKABLES);
p += unlockables;
}
p++; // mapmusrng