| 3919 | } |
| 3920 | |
| 3921 | void CServer::ConRecord(IConsole::IResult *pResult, void *pUser) |
| 3922 | { |
| 3923 | CServer *pServer = (CServer *)pUser; |
| 3924 | |
| 3925 | if(pServer->IsRecording(RECORDER_MANUAL)) |
| 3926 | { |
| 3927 | pServer->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "demo_recorder", "Demo recorder already recording"); |
| 3928 | return; |
| 3929 | } |
| 3930 | |
| 3931 | char aFilename[IO_MAX_PATH_LENGTH]; |
| 3932 | if(pResult->NumArguments()) |
| 3933 | { |
| 3934 | str_format(aFilename, sizeof(aFilename), "demos/%s.demo", pResult->GetString(0)); |
| 3935 | } |
| 3936 | else |
| 3937 | { |
| 3938 | char aTimestamp[20]; |
| 3939 | str_timestamp(aTimestamp, sizeof(aTimestamp)); |
| 3940 | str_format(aFilename, sizeof(aFilename), "demos/demo_%s.demo", aTimestamp); |
| 3941 | } |
| 3942 | pServer->m_aDemoRecorder[RECORDER_MANUAL].Start( |
| 3943 | pServer->Storage(), |
| 3944 | pServer->Console(), |
| 3945 | aFilename, |
| 3946 | pServer->GameServer()->NetVersion(), |
| 3947 | pServer->GameServer()->Map()->BaseName(), |
| 3948 | pServer->m_aCurrentMapSha256[MAP_TYPE_SIX], |
| 3949 | pServer->m_aCurrentMapCrc[MAP_TYPE_SIX], |
| 3950 | "server", |
| 3951 | pServer->m_aCurrentMapSize[MAP_TYPE_SIX], |
| 3952 | pServer->m_apCurrentMapData[MAP_TYPE_SIX], |
| 3953 | nullptr, |
| 3954 | nullptr, |
| 3955 | nullptr); |
| 3956 | } |
| 3957 | |
| 3958 | void CServer::ConStopRecord(IConsole::IResult *pResult, void *pUser) |
| 3959 | { |
nothing calls this directly
no test coverage detected