2240: Don't reset zoom when using timeline in demo r=heinrich5991 a=def-

Thanks to Lady Saavik for reporting

Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2020-06-02 17:25:02 +00:00 committed by GitHub
commit ef51f35840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -342,7 +342,6 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
if(Amount > 0.0f && Amount < 1.0f && absolute(PrevAmount-Amount) >= 0.0001f) if(Amount > 0.0f && Amount < 1.0f && absolute(PrevAmount-Amount) >= 0.0001f)
{ {
//PrevAmount = Amount; //PrevAmount = Amount;
m_pClient->OnReset();
m_pClient->m_SuppressEvents = true; m_pClient->m_SuppressEvents = true;
DemoPlayer()->SeekPercent(Amount); DemoPlayer()->SeekPercent(Amount);
m_pClient->m_SuppressEvents = false; m_pClient->m_SuppressEvents = false;
@ -355,7 +354,6 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
if(Amount > 0.0f && Amount < 1.0f && absolute(PrevAmount-Amount) >= 0.001f) if(Amount > 0.0f && Amount < 1.0f && absolute(PrevAmount-Amount) >= 0.001f)
{ {
PrevAmount = Amount; PrevAmount = Amount;
m_pClient->OnReset();
m_pClient->m_SuppressEvents = true; m_pClient->m_SuppressEvents = true;
DemoPlayer()->SeekPercent(Amount); DemoPlayer()->SeekPercent(Amount);
m_pClient->m_SuppressEvents = false; m_pClient->m_SuppressEvents = false;
@ -377,7 +375,6 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
if(CurrentTick == TotalTicks) if(CurrentTick == TotalTicks)
{ {
m_pClient->OnReset();
DemoPlayer()->Pause(); DemoPlayer()->Pause();
DemoPlayer()->SeekPercent(0.0f); DemoPlayer()->SeekPercent(0.0f);
} }
@ -409,7 +406,6 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
static int s_ResetButton = 0; static int s_ResetButton = 0;
if(DoButton_Sprite(&s_ResetButton, IMAGE_DEMOBUTTONS, SPRITE_DEMOBUTTON_STOP, false, &Button, CUI::CORNER_ALL)) if(DoButton_Sprite(&s_ResetButton, IMAGE_DEMOBUTTONS, SPRITE_DEMOBUTTON_STOP, false, &Button, CUI::CORNER_ALL))
{ {
m_pClient->OnReset();
DemoPlayer()->Pause(); DemoPlayer()->Pause();
DemoPlayer()->SeekPercent(0.0f); DemoPlayer()->SeekPercent(0.0f);
} }