mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
added single function to stop recording by Batchyx
This commit is contained in:
parent
39b531452a
commit
bd9850cae2
|
@ -77,6 +77,7 @@ public:
|
||||||
virtual void Quit() = 0;
|
virtual void Quit() = 0;
|
||||||
virtual const char *DemoPlayer_Play(const char *pFilename, int StorageType) = 0;
|
virtual const char *DemoPlayer_Play(const char *pFilename, int StorageType) = 0;
|
||||||
virtual void DemoRecorder_Start(const char *pFilename) = 0;
|
virtual void DemoRecorder_Start(const char *pFilename) = 0;
|
||||||
|
virtual void DemoRecorder_Stop() = 0;
|
||||||
|
|
||||||
// networking
|
// networking
|
||||||
virtual void EnterGame() = 0;
|
virtual void EnterGame() = 0;
|
||||||
|
|
|
@ -526,7 +526,7 @@ void CClient::Connect(const char *pAddress)
|
||||||
SetState(IClient::STATE_CONNECTING);
|
SetState(IClient::STATE_CONNECTING);
|
||||||
|
|
||||||
if(m_DemoRecorder.IsRecording())
|
if(m_DemoRecorder.IsRecording())
|
||||||
m_DemoRecorder.Stop();
|
DemoRecorder_Stop();
|
||||||
|
|
||||||
m_InputtimeMarginGraph.Init(-150.0f, 150.0f);
|
m_InputtimeMarginGraph.Init(-150.0f, 150.0f);
|
||||||
m_GametimeMarginGraph.Init(-150.0f, 150.0f);
|
m_GametimeMarginGraph.Init(-150.0f, 150.0f);
|
||||||
|
@ -540,7 +540,7 @@ void CClient::DisconnectWithReason(const char *pReason)
|
||||||
|
|
||||||
// stop demo playback and recorder
|
// stop demo playback and recorder
|
||||||
m_DemoPlayer.Stop();
|
m_DemoPlayer.Stop();
|
||||||
m_DemoRecorder.Stop();
|
DemoRecorder_Stop();
|
||||||
|
|
||||||
//
|
//
|
||||||
m_RconAuthed = 0;
|
m_RconAuthed = 0;
|
||||||
|
@ -780,7 +780,7 @@ const char *CClient::LoadMap(const char *pName, const char *pFilename, unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop demo recording if we loaded a new map
|
// stop demo recording if we loaded a new map
|
||||||
m_DemoRecorder.Stop();
|
DemoRecorder_Stop();
|
||||||
|
|
||||||
char aBuf[256];
|
char aBuf[256];
|
||||||
str_format(aBuf, sizeof(aBuf), "loaded map '%s'", pFilename);
|
str_format(aBuf, sizeof(aBuf), "loaded map '%s'", pFilename);
|
||||||
|
@ -1938,6 +1938,11 @@ void CClient::DemoRecorder_Start(const char *pFilename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CClient::DemoRecorder_Stop()
|
||||||
|
{
|
||||||
|
m_DemoRecorder.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
void CClient::Con_Record(IConsole::IResult *pResult, void *pUserData)
|
void CClient::Con_Record(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CClient *pSelf = (CClient *)pUserData;
|
CClient *pSelf = (CClient *)pUserData;
|
||||||
|
@ -1947,7 +1952,7 @@ void CClient::Con_Record(IConsole::IResult *pResult, void *pUserData)
|
||||||
void CClient::Con_StopRecord(IConsole::IResult *pResult, void *pUserData)
|
void CClient::Con_StopRecord(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CClient *pSelf = (CClient *)pUserData;
|
CClient *pSelf = (CClient *)pUserData;
|
||||||
pSelf->m_DemoRecorder.Stop();
|
pSelf->DemoRecorder_Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CClient::RegisterCommands()
|
void CClient::RegisterCommands()
|
||||||
|
|
|
@ -285,6 +285,7 @@ public:
|
||||||
|
|
||||||
const char *DemoPlayer_Play(const char *pFilename, int StorageType);
|
const char *DemoPlayer_Play(const char *pFilename, int StorageType);
|
||||||
void DemoRecorder_Start(const char *pFilename);
|
void DemoRecorder_Start(const char *pFilename);
|
||||||
|
void DemoRecorder_Stop();
|
||||||
|
|
||||||
virtual class CEngine *Engine() { return &m_Engine; }
|
virtual class CEngine *Engine() { return &m_Engine; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -110,7 +110,7 @@ void CMenus::RenderGame(CUIRect MainView)
|
||||||
Client()->DemoRecorder_Start(aFilename);
|
Client()->DemoRecorder_Start(aFilename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DemoRecorder()->Stop();
|
Client()->DemoRecorder_Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue