mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Hide client is not online
log message except when using record
The log message is otherwise shown multiple times when starting the client. Now it's only shown when the `record` command is used manually, i.e. not for automatically recorded demos anymore.
This commit is contained in:
parent
e3700ac4e4
commit
95b1c7dc2b
|
@ -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)
|
||||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "demorec/record", "client is not 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