mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Merge branch 'skip-ghost-player-extradata' into 'master'
Allow player extradatas past p0 in ghost demos Closes #1175 See merge request KartKrew/Kart!2120
This commit is contained in:
commit
3d06ede948
1 changed files with 16 additions and 3 deletions
|
|
@ -1266,8 +1266,12 @@ readghosttic:
|
||||||
|
|
||||||
while (ziptic != DW_END) // Get rid of extradata stuff
|
while (ziptic != DW_END) // Get rid of extradata stuff
|
||||||
{
|
{
|
||||||
if (ziptic == 0) // Only support player 0 info for now
|
if (ziptic < MAXPLAYERS)
|
||||||
{
|
{
|
||||||
|
UINT8 playerid = ziptic;
|
||||||
|
// We want to skip *any* player extradata because some demos have extradata for bogus players,
|
||||||
|
// but if there is tic data later for those players *then* we'll consider it invalid.
|
||||||
|
|
||||||
ziptic = READUINT8(g->p);
|
ziptic = READUINT8(g->p);
|
||||||
if (ziptic & DXD_JOINDATA)
|
if (ziptic & DXD_JOINDATA)
|
||||||
{
|
{
|
||||||
|
|
@ -1275,8 +1279,17 @@ readghosttic:
|
||||||
if (READUINT8(g->p) != 0)
|
if (READUINT8(g->p) != 0)
|
||||||
I_Error("Ghost is not a record attack ghost (bot JOINDATA)");
|
I_Error("Ghost is not a record attack ghost (bot JOINDATA)");
|
||||||
}
|
}
|
||||||
if (ziptic & DXD_PLAYSTATE && READUINT8(g->p) != DXD_PST_PLAYING)
|
if (ziptic & DXD_PLAYSTATE)
|
||||||
I_Error("Ghost is not a record attack ghost (has PLAYSTATE)");
|
{
|
||||||
|
UINT8 playstate = READUINT8(g->p);
|
||||||
|
if (playstate != DXD_PST_PLAYING)
|
||||||
|
{
|
||||||
|
#ifdef DEVELOP
|
||||||
|
CONS_Alert(CONS_WARNING, "Ghost demo has non-playing playstate for player %d\n", playerid + 1);
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ziptic & DXD_SKIN)
|
if (ziptic & DXD_SKIN)
|
||||||
g->p++; // We _could_ read this info, but it shouldn't change anything in record attack...
|
g->p++; // We _could_ read this info, but it shouldn't change anything in record attack...
|
||||||
if (ziptic & DXD_COLOR)
|
if (ziptic & DXD_COLOR)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue