Record net replays to replay/online/

This commit is contained in:
fickleheart 2019-02-03 14:29:54 -06:00
parent fe7c6c7f83
commit 7aa83635ae
2 changed files with 6 additions and 2 deletions

View File

@ -5729,7 +5729,7 @@ void G_RecordDemo(const char *name)
{
INT32 maxsize;
CONS_Printf("Recording demo %s\n", name);
CONS_Printf("Recording demo %s.lmp\n", name);
strcpy(demoname, name);
strcat(demoname, ".lmp");

View File

@ -3158,9 +3158,13 @@ boolean P_SetupLevel(boolean skipprecip)
//@TODO NET REPLAYS NEED BETTER FILE NAMING STUFF. ALSO OPTIONS. FUCK.
if (!demoplayback && multiplayer) {
// lol sorry
#include "time.h"
static char buf[256];
sprintf(buf, "net_replay_test_%d", time(NULL));
sprintf(buf, "replay"PATHSEP"online"PATHSEP"%d-%s", time(NULL), G_BuildMapName(gamemap));
I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755);
I_mkdir(va("%s"PATHSEP"replay"PATHSEP"online", srb2home), 0755);
G_RecordDemo(buf);
}