mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-22 07:52:30 +00:00
Merge branch 'fix-ghosts' into 'master'
Fix G_AddGhost and G_GetStaffGhostBrief to handle unlockables and mapmusrng See merge request KartKrew/Kart!2008
This commit is contained in:
commit
bab29c7164
1 changed files with 16 additions and 0 deletions
|
|
@ -3588,6 +3588,14 @@ void G_AddGhost(savebuffer_t *buffer, const char *defdemoname)
|
||||||
if ((flags & DF_GRANDPRIX))
|
if ((flags & DF_GRANDPRIX))
|
||||||
p += 3;
|
p += 3;
|
||||||
|
|
||||||
|
// Skip unlockables
|
||||||
|
{
|
||||||
|
UINT32 unlockables = READUINT32(p);
|
||||||
|
p += std::min<UINT32>(unlockables, MAXUNLOCKABLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
p++; // mapmusrng
|
||||||
|
|
||||||
if (*p == DEMOMARKER)
|
if (*p == DEMOMARKER)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_NOTICE, M_GetText("Failed to add ghost %s: Replay is empty.\n"), defdemoname);
|
CONS_Alert(CONS_NOTICE, M_GetText("Failed to add ghost %s: Replay is empty.\n"), defdemoname);
|
||||||
|
|
@ -3803,6 +3811,14 @@ staffbrief_t *G_GetStaffGhostBrief(UINT8 *buffer)
|
||||||
if ((flags & DF_GRANDPRIX))
|
if ((flags & DF_GRANDPRIX))
|
||||||
p += 3;
|
p += 3;
|
||||||
|
|
||||||
|
// Skip unlockables
|
||||||
|
{
|
||||||
|
UINT32 unlockables = READUINT32(p);
|
||||||
|
p += std::min<UINT32>(unlockables, MAXUNLOCKABLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
p++; // mapmusrng
|
||||||
|
|
||||||
// Assert first player is in and then read name
|
// Assert first player is in and then read name
|
||||||
if (READUINT8(p) != 0)
|
if (READUINT8(p) != 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue