Pause demo playback when skipping to end

It's otherwise inconvenient when the playback continues, as it will immediate rewind to the beginning when reaching the end.
This commit is contained in:
Robert Müller 2023-05-15 23:40:14 +02:00
parent 84457980e9
commit d9c737673a

View file

@ -89,6 +89,8 @@ void CMenus::HandleDemoSeeking(float PositionToSeek, float TimeToSeek)
m_pClient->m_SuppressEvents = false;
m_pClient->m_MapLayersBackGround.EnvelopeUpdate();
m_pClient->m_MapLayersForeGround.EnvelopeUpdate();
if(!DemoPlayer()->BaseInfo()->m_Paused && PositionToSeek == 1.0f)
DemoPlayer()->Pause();
}
}