Change path to demos/auto/server. Use same filename format as client.

This commit is contained in:
furo 2023-12-25 15:19:12 +01:00
parent 1c098c2941
commit b1f9137e34
2 changed files with 3 additions and 2 deletions

View file

@ -3403,13 +3403,13 @@ void CServer::DemoRecorder_HandleAutoStart()
char aFilename[IO_MAX_PATH_LENGTH];
char aDate[20];
str_timestamp(aDate, sizeof(aDate));
str_format(aFilename, sizeof(aFilename), "demos/%s_%s.demo", "auto/autorecord", aDate);
str_format(aFilename, sizeof(aFilename), "demos/auto/server/%s_%s.demo", m_aCurrentMap, aDate);
m_aDemoRecorder[RECORDER_AUTO].Start(Storage(), m_pConsole, aFilename, GameServer()->NetVersion(), m_aCurrentMap, m_aCurrentMapSha256[MAP_TYPE_SIX], m_aCurrentMapCrc[MAP_TYPE_SIX], "server", m_aCurrentMapSize[MAP_TYPE_SIX], m_apCurrentMapData[MAP_TYPE_SIX]);
if(Config()->m_SvAutoDemoMax)
{
// clean up auto recorded demos
CFileCollection AutoDemos;
AutoDemos.Init(Storage(), "demos/server", "autorecord", ".demo", Config()->m_SvAutoDemoMax);
AutoDemos.Init(Storage(), "demos/auto/server", "", ".demo", Config()->m_SvAutoDemoMax);
}
}
}

View file

@ -109,6 +109,7 @@ public:
CreateFolder("demos", TYPE_SAVE);
CreateFolder("demos/auto", TYPE_SAVE);
CreateFolder("demos/auto/race", TYPE_SAVE);
CreateFolder("demos/auto/server", TYPE_SAVE);
CreateFolder("demos/replays", TYPE_SAVE);
CreateFolder("editor", TYPE_SAVE);
CreateFolder("ghosts", TYPE_SAVE);