mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #7104 from Robyt3/Client-Demo-Record-Verbose
Hide `client is not online` log message except when using `record`
This commit is contained in:
commit
7ad18dec6d
|
@ -167,7 +167,7 @@ public:
|
|||
#if defined(CONF_VIDEORECORDER)
|
||||
virtual const char *DemoPlayer_Render(const char *pFilename, int StorageType, const char *pVideoName, int SpeedIndex, bool StartPaused = false) = 0;
|
||||
#endif
|
||||
virtual void DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int Recorder) = 0;
|
||||
virtual void DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int Recorder, bool Verbose = false) = 0;
|
||||
virtual void DemoRecorder_HandleAutoStart() = 0;
|
||||
virtual void DemoRecorder_Stop(int Recorder, bool RemoveFile = false) = 0;
|
||||
virtual class IDemoRecorder *DemoRecorder(int Recorder) = 0;
|
||||
|
|
|
@ -3957,10 +3957,13 @@ void CClient::Con_DemoSpeed(IConsole::IResult *pResult, void *pUserData)
|
|||
pSelf->m_DemoPlayer.SetSpeed(pResult->GetFloat(0));
|
||||
}
|
||||
|
||||
void CClient::DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int Recorder)
|
||||
void CClient::DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int Recorder, bool Verbose)
|
||||
{
|
||||
if(State() != IClient::STATE_ONLINE)
|
||||
{
|
||||
if(Verbose)
|
||||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "demorec/record", "client is not online");
|
||||
}
|
||||
else
|
||||
{
|
||||
char aFilename[IO_MAX_PATH_LENGTH];
|
||||
|
@ -4038,9 +4041,9 @@ void CClient::Con_Record(IConsole::IResult *pResult, void *pUserData)
|
|||
{
|
||||
CClient *pSelf = (CClient *)pUserData;
|
||||
if(pResult->NumArguments())
|
||||
pSelf->DemoRecorder_Start(pResult->GetString(0), false, RECORDER_MANUAL);
|
||||
pSelf->DemoRecorder_Start(pResult->GetString(0), false, RECORDER_MANUAL, true);
|
||||
else
|
||||
pSelf->DemoRecorder_Start(pSelf->m_aCurrentMap, true, RECORDER_MANUAL);
|
||||
pSelf->DemoRecorder_Start(pSelf->m_aCurrentMap, true, RECORDER_MANUAL, true);
|
||||
}
|
||||
|
||||
void CClient::Con_StopRecord(IConsole::IResult *pResult, void *pUserData)
|
||||
|
|
|
@ -482,7 +482,7 @@ public:
|
|||
void RegisterCommands();
|
||||
|
||||
const char *DemoPlayer_Play(const char *pFilename, int StorageType) override;
|
||||
void DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int Recorder) override;
|
||||
void DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int Recorder, bool Verbose = false) override;
|
||||
void DemoRecorder_HandleAutoStart() override;
|
||||
void DemoRecorder_StartReplayRecorder();
|
||||
void DemoRecorder_Stop(int Recorder, bool RemoveFile = false) override;
|
||||
|
|
Loading…
Reference in a new issue