mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
reset demo player on end and when pressing the stop button. Closes #401
This commit is contained in:
parent
a9f7f3a3ea
commit
9358b24113
|
@ -130,6 +130,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
||||||
|
|
||||||
if(CurrentTick == TotalTicks)
|
if(CurrentTick == TotalTicks)
|
||||||
{
|
{
|
||||||
|
m_pClient->OnReset();
|
||||||
DemoPlayer()->Pause();
|
DemoPlayer()->Pause();
|
||||||
DemoPlayer()->SetPos(0);
|
DemoPlayer()->SetPos(0);
|
||||||
}
|
}
|
||||||
|
@ -160,6 +161,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
||||||
static int s_ResetButton = 0;
|
static int s_ResetButton = 0;
|
||||||
if(DoButton_DemoPlayer_Sprite(&s_ResetButton, SPRITE_DEMOBUTTON_STOP, false, &Button))
|
if(DoButton_DemoPlayer_Sprite(&s_ResetButton, SPRITE_DEMOBUTTON_STOP, false, &Button))
|
||||||
{
|
{
|
||||||
|
m_pClient->OnReset();
|
||||||
DemoPlayer()->Pause();
|
DemoPlayer()->Pause();
|
||||||
DemoPlayer()->SetPos(0);
|
DemoPlayer()->SetPos(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue