Skip to content

Commit

Permalink
Account for steps first/lastsecond in progress bar (overall)
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Jul 9, 2020
1 parent 4cffbec commit 872b54c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Etterna/Actor/GameplayAndMenus/MeterDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,17 @@ void
SongMeterDisplay::Update(float fDeltaTime)
{
if (GAMESTATE->m_pCurSong) {
float fSongStartSeconds = GAMESTATE->m_pCurSong->GetFirstSecond();
float fSongEndSeconds = GAMESTATE->m_pCurSong->GetLastSecond();
float fSongStartSeconds = 0.F;
float fSongEndSeconds = 0.F;
if (GAMESTATE->m_pCurSteps) {
fSongStartSeconds = GAMESTATE->m_pCurSteps->firstsecond;
fSongEndSeconds = GAMESTATE->m_pCurSteps->lastsecond;
}
else
{
fSongStartSeconds = GAMESTATE->m_pCurSong->GetFirstSecond();
fSongEndSeconds = GAMESTATE->m_pCurSong->GetLastSecond();
}
float fPercentPositionSong =
SCALE(GAMESTATE->m_Position.m_fMusicSeconds,
fSongStartSeconds,
Expand Down

0 comments on commit 872b54c

Please sign in to comment.