mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 22:18:19 +00:00
demoplayer disconnect when render finished
This commit is contained in:
parent
628f1eb777
commit
1c150106f8
|
@ -778,6 +778,7 @@ void CClient::DisconnectWithReason(const char *pReason)
|
|||
|
||||
void CClient::Disconnect()
|
||||
{
|
||||
m_ButtonRender = false;
|
||||
if(m_DummyConnected)
|
||||
DummyDisconnect(0);
|
||||
if(m_State != IClient::STATE_OFFLINE)
|
||||
|
@ -2515,6 +2516,8 @@ void CClient::Update()
|
|||
IVideo::Current()->nextVideoFrame();
|
||||
}
|
||||
}
|
||||
else if(m_ButtonRender)
|
||||
Disconnect();
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -3573,6 +3576,7 @@ const char *CClient::DemoPlayer_Render(const char *pFilename, int StorageType, c
|
|||
|
||||
// enter demo playback state
|
||||
SetState(IClient::STATE_DEMOPLAYBACK);
|
||||
m_ButtonRender = true;
|
||||
|
||||
this->CClient::StartVideo(NULL, this, pVideoName);
|
||||
m_DemoPlayer.Play();
|
||||
|
|
|
@ -122,6 +122,7 @@ class CClient : public IClient, public CDemoPlayer::IListener
|
|||
int m_UseTempRconCommands;
|
||||
char m_Password[32];
|
||||
bool m_SendPassword;
|
||||
bool m_ButtonRender=false;
|
||||
|
||||
// version-checking
|
||||
char m_aVersionStr[10];
|
||||
|
|
Loading…
Reference in a new issue