diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 53de836d9..d12f234d1 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -3100,6 +3100,12 @@ void CClient::Con_DemoPlay(IConsole::IResult *pResult, void *pUserData) } } +void CClient::Con_DemoSpeed(IConsole::IResult *pResult, void *pUserData) +{ + CClient *pSelf = (CClient *)pUserData; + pSelf->m_DemoPlayer.SetSpeed(pResult->GetFloat(0)); +} + void CClient::DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int Recorder) { if(State() != IClient::STATE_ONLINE) @@ -3221,6 +3227,7 @@ void CClient::RegisterCommands() m_pConsole->Register("demo_slice_start", "", CFGFLAG_CLIENT, Con_DemoSliceBegin, this, ""); m_pConsole->Register("demo_slice_end", "", CFGFLAG_CLIENT, Con_DemoSliceEnd, this, ""); m_pConsole->Register("demo_play", "", CFGFLAG_CLIENT, Con_DemoPlay, this, "Play demo"); + m_pConsole->Register("demo_speed", "i[speed]", CFGFLAG_CLIENT, Con_DemoSpeed, this, "Set demo speed"); // used for server browser update m_pConsole->Chain("br_filter_string", ConchainServerBrowserUpdate, this); diff --git a/src/engine/client/client.h b/src/engine/client/client.h index b1a8412cc..1b78c12f2 100644 --- a/src/engine/client/client.h +++ b/src/engine/client/client.h @@ -320,6 +320,7 @@ public: static void Con_Quit(IConsole::IResult *pResult, void *pUserData); static void Con_DemoPlay(IConsole::IResult *pResult, void *pUserData); + static void Con_DemoSpeed(IConsole::IResult *pResult, void *pUserData); static void Con_Minimize(IConsole::IResult *pResult, void *pUserData); static void Con_Ping(IConsole::IResult *pResult, void *pUserData); static void Con_Screenshot(IConsole::IResult *pResult, void *pUserData);