reset demo player on end and when pressing the stop button. Closes #401

This commit is contained in:
oy 2011-01-09 23:42:37 +01:00
parent a9f7f3a3ea
commit 9358b24113

View file

@ -130,6 +130,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
if(CurrentTick == TotalTicks)
{
m_pClient->OnReset();
DemoPlayer()->Pause();
DemoPlayer()->SetPos(0);
}
@ -160,6 +161,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
static int s_ResetButton = 0;
if(DoButton_DemoPlayer_Sprite(&s_ResetButton, SPRITE_DEMOBUTTON_STOP, false, &Button))
{
m_pClient->OnReset();
DemoPlayer()->Pause();
DemoPlayer()->SetPos(0);
}