mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Make demos be named edemoXXX.edm, XXX ranging from 000 to 999.
Also, don't stop playback cycling at the 10th demo and show the demo number when beginning to record one. git-svn-id: https://svn.eduke32.com/eduke32@3003 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a1aac0480b
commit
ef7e057fd9
1 changed files with 17 additions and 17 deletions
|
@ -78,25 +78,25 @@ void Demo_PrepareWarp(void)
|
|||
|
||||
static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine
|
||||
{
|
||||
char demofn[14];
|
||||
int32_t i;
|
||||
|
||||
savehead_t saveh;
|
||||
|
||||
Bstrcpy(demofn, "edemo_.edm");
|
||||
|
||||
if (g_whichDemo == 10)
|
||||
demofn[5] = 'x';
|
||||
else
|
||||
demofn[5] = '0' + g_whichDemo;
|
||||
char demofn[14];
|
||||
const char *demofnptr;
|
||||
|
||||
if (g_whichDemo == 1 && g_firstDemoFile[0])
|
||||
{
|
||||
char *demofnptr = (g_whichDemo == 1 && g_firstDemoFile[0]) ? g_firstDemoFile : demofn;
|
||||
|
||||
g_demo_recFilePtr = kopen4loadfrommod(demofnptr, g_loadFromGroupOnly);
|
||||
if (g_demo_recFilePtr == -1)
|
||||
return 0;
|
||||
demofnptr = g_firstDemoFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
Bsprintf(demofn, "edemo%03d.edm", g_whichDemo);
|
||||
demofnptr = demofn;
|
||||
}
|
||||
|
||||
g_demo_recFilePtr = kopen4loadfrommod(demofnptr, g_loadFromGroupOnly);
|
||||
if (g_demo_recFilePtr == -1)
|
||||
return 0;
|
||||
|
||||
Bassert(g_whichDemo >= 1);
|
||||
i = sv_loadsnapshot(g_demo_recFilePtr, -g_whichDemo, &saveh);
|
||||
|
@ -175,10 +175,10 @@ void G_OpenDemoWrite(void)
|
|||
|
||||
do
|
||||
{
|
||||
if (demonum == 10000)
|
||||
if (demonum == 1000)
|
||||
return;
|
||||
|
||||
if (G_ModDirSnprintf(demofn, sizeof(demofn), "edemo%d.edm", demonum))
|
||||
if (G_ModDirSnprintf(demofn, sizeof(demofn), "edemo%03d.edm", demonum))
|
||||
{
|
||||
initprintf("Couldn't start demo writing: INTERNAL ERROR: file name too long\n");
|
||||
goto error_wopen_demo;
|
||||
|
@ -215,7 +215,7 @@ error_wopen_demo:
|
|||
demo_synccompress = demorec_synccompress_cvar;
|
||||
demorec_difftics = demorec_difftics_cvar;
|
||||
|
||||
Bstrcpy(ScriptQuotes[QUOTE_RESERVED4], "DEMO RECORDING STARTED");
|
||||
Bsprintf(ScriptQuotes[QUOTE_RESERVED4], "DEMO %d RECORDING STARTED", demonum-1);
|
||||
P_DoQuote(QUOTE_RESERVED4, g_player[myconnectindex].ps);
|
||||
|
||||
ud.reccnt = 0;
|
||||
|
@ -398,7 +398,7 @@ RECHECK:
|
|||
{
|
||||
ud.recstat = 2;
|
||||
g_whichDemo++;
|
||||
if (g_whichDemo == 10)
|
||||
if (g_whichDemo == 1000)
|
||||
g_whichDemo = 1;
|
||||
|
||||
g_player[myconnectindex].ps->gm &= ~MODE_GAME;
|
||||
|
|
Loading…
Reference in a new issue