mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add demo_speed command (fixes #354)
This commit is contained in:
parent
0f5611c2f0
commit
ccbdf1d073
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue