MCPcopy Create free account
hub / github.com/ddnet/ddnet / SaveDemo

Method SaveDemo

src/engine/server/server.cpp:3864–3872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3862}
3863
3864void CServer::SaveDemo(int ClientId, float Time)
3865{
3866 if(IsRecording(ClientId))
3867 {
3868 char aNewFilename[IO_MAX_PATH_LENGTH];
3869 str_format(aNewFilename, sizeof(aNewFilename), "demos/%s_%s_%05.2f.demo", GameServer()->Map()->BaseName(), m_aClients[ClientId].m_aName, Time);
3870 m_aDemoRecorder[ClientId].Stop(IDemoRecorder::EStopMode::KEEP_FILE, aNewFilename);
3871 }
3872}
3873
3874void CServer::StartRecord(int ClientId)
3875{

Callers 2

TickMethod · 0.80
StopRecordingMethod · 0.80

Calls 4

str_formatFunction · 0.85
BaseNameMethod · 0.45
MapMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected