mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'fix-antique-ghost-netvars' into 'next'
Fix antique ghost netvars See merge request STJr/SRB2!1545
This commit is contained in:
commit
94799e2196
1 changed files with 15 additions and 5 deletions
20
src/g_demo.c
20
src/g_demo.c
|
@ -2023,7 +2023,7 @@ void G_AddGhost(char *defdemoname)
|
|||
char name[17],skin[17],color[MAXCOLORNAME+1],*n,*pdemoname,md5[16];
|
||||
UINT8 cnamelen;
|
||||
demoghost *gh;
|
||||
UINT8 flags;
|
||||
UINT8 flags, subversion;
|
||||
UINT8 *buffer,*p;
|
||||
mapthing_t *mthing;
|
||||
UINT16 count, ghostversion;
|
||||
|
@ -2071,7 +2071,7 @@ void G_AddGhost(char *defdemoname)
|
|||
return;
|
||||
} p += 12; // DEMOHEADER
|
||||
p++; // VERSION
|
||||
p++; // SUBVERSION
|
||||
subversion = READUINT8(p); // SUBVERSION
|
||||
ghostversion = READUINT16(p);
|
||||
switch(ghostversion)
|
||||
{
|
||||
|
@ -2170,9 +2170,19 @@ void G_AddGhost(char *defdemoname)
|
|||
count = READUINT16(p);
|
||||
while (count--)
|
||||
{
|
||||
SKIPSTRING(p);
|
||||
SKIPSTRING(p);
|
||||
p++;
|
||||
// In 2.2.7 netvar saving was updated
|
||||
if (subversion < 7)
|
||||
{
|
||||
p += 2;
|
||||
SKIPSTRING(p);
|
||||
p++;
|
||||
}
|
||||
else
|
||||
{
|
||||
SKIPSTRING(p);
|
||||
SKIPSTRING(p);
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
if (*p == DEMOMARKER)
|
||||
|
|
Loading…
Reference in a new issue