From 43bd6cd664daefdfa25c0aca0b63e1b510587dd0 Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 20 Dec 2021 01:20:17 -0800 Subject: [PATCH] Replays: use git commit in DEVELOP, version string in release --- src/p_setup.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 2fc2ff53c..c2acee545 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3799,10 +3799,16 @@ static void P_InitGametype(void) if (!demo.playback && multiplayer && !dedicated) { char buf[MAX_WADPATH]; + char ver[128]; int parts; - sprintf(buf, "%s"PATHSEP"media"PATHSEP"replay"PATHSEP"online"PATHSEP"%s-%s"PATHSEP"%d-%s", - srb2home, compbranch, comprevision, (int) (time(NULL)), G_BuildMapName(gamemap)); +#ifdef DEVELOP + sprintf(ver, "%s-%s", compbranch, comprevision); +#else + strcpy(ver, VERSIONSTRING); +#endif + sprintf(buf, "%s"PATHSEP"media"PATHSEP"replay"PATHSEP"online"PATHSEP"%s"PATHSEP"%d-%s", + srb2home, ver, (int) (time(NULL)), G_BuildMapName(gamemap)); parts = M_PathParts(buf); M_MkdirEachUntil(buf, parts - 5, parts - 1, 0755);