Support RA time comparisons in new format

I don't care enough about supporting old replays, and
they're old anyway. Force-overwrite them. :)
This commit is contained in:
fickleheart 2019-04-08 00:45:19 -05:00
parent c0af0fb59e
commit 9a049f5a0d

View file

@ -6772,10 +6772,8 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
p += 2; // gamemap p += 2; // gamemap
p += 16; // map md5 p += 16; // map md5
flags = READUINT8(p); // demoflags flags = READUINT8(p); // demoflags
if (flags & DF_FILELIST) // file list p++; // gametype
{
G_SkipDemoExtraFiles(&p); G_SkipDemoExtraFiles(&p);
}
aflags = flags & (DF_RECORDATTACK|DF_NIGHTSATTACK); aflags = flags & (DF_RECORDATTACK|DF_NIGHTSATTACK);
I_Assert(aflags); I_Assert(aflags);
@ -6820,7 +6818,10 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
break; break;
#ifdef DEMO_COMPAT_100 #ifdef DEMO_COMPAT_100
case 0x0001: case 0x0001:
I_Error("You need to implement demo compat here, doofus! %s:%d", __FILE__, __LINE__); // Old replays gotta go :]
CONS_Alert(CONS_NOTICE, M_GetText("File '%s' outdated version. It will be overwritten. Nyeheheh.\n"), oldname);
Z_Free(buffer);
return UINT8_MAX;
#endif #endif
// too old, cannot support. // too old, cannot support.
default: default:
@ -6838,10 +6839,8 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
p += 2; // gamemap p += 2; // gamemap
p += 16; // mapmd5 p += 16; // mapmd5
flags = READUINT8(p); flags = READUINT8(p);
if (flags & DF_FILELIST) // file list p++; // gametype
{
G_SkipDemoExtraFiles(&p); G_SkipDemoExtraFiles(&p);
}
if (!(flags & aflags)) if (!(flags & aflags))
{ {
CONS_Alert(CONS_NOTICE, M_GetText("File '%s' not from same game mode. It will be overwritten.\n"), oldname); CONS_Alert(CONS_NOTICE, M_GetText("File '%s' not from same game mode. It will be overwritten.\n"), oldname);