git-svn-id: https://svn.eduke32.com/eduke32@1840 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2011-03-11 21:28:04 +00:00
parent ebfb0b1ad6
commit 3eb9d8fb5c

View file

@ -163,16 +163,21 @@ void G_OpenDemoWrite(void)
} }
} }
while (1) do
{ {
if (demonum == 10000) return; if (demonum == 10000) return;
Bsprintf(d, "edemo%d.edm", demonum++);
g_demo_filePtr = fopen(d, "rb"); if (g_modDir[0] != '/')
Bsprintf(d,"%s/edemo%d.edm",g_modDir, demonum++);
else Bsprintf(d, "edemo%d.edm", demonum++);
g_demo_filePtr = Bfopen(d, "rb");
if (g_demo_filePtr == NULL) break; if (g_demo_filePtr == NULL) break;
Bfclose(g_demo_filePtr); Bfclose(g_demo_filePtr);
} }
while (1);
if ((g_demo_filePtr = fopen(d,"wb")) == NULL) return; if ((g_demo_filePtr = Bfopen(d,"wb")) == NULL) return;
i=sv_saveandmakesnapshot(g_demo_filePtr, demorec_diffs_cvar, demorec_diffcompress_cvar, i=sv_saveandmakesnapshot(g_demo_filePtr, demorec_diffs_cvar, demorec_diffcompress_cvar,
demorec_synccompress_cvar|(demorec_seeds_cvar<<1)); demorec_synccompress_cvar|(demorec_seeds_cvar<<1));