Skip to content

Commit

Permalink
Switch to fast music immediatley on lastp lap, and not only
Browse files Browse the repository at this point in the history
when 30 seconds are left.
  • Loading branch information
hiker committed Dec 10, 2014
1 parent cad0fba commit 3c62047
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/modes/linear_world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,14 +740,11 @@ void LinearWorld::updateRacePosition()
#endif

// Switch on faster music if not already done so, if the
// first kart is doing its last lap, and if the estimated
// remaining time is less than 30 seconds.
// first kart is doing its last lap.
if(!m_faster_music_active &&
kart_info.m_race_lap == race_manager->getNumLaps()-1 &&
p==1 &&
useFastMusicNearEnd() &&
kart_info.m_estimated_finish > 0 &&
kart_info.m_estimated_finish - getTime() < 30.0f )
p == 1 &&
kart_info.m_race_lap == race_manager->getNumLaps() - 1 &&
useFastMusicNearEnd() )
{
music_manager->switchToFastMusic();
m_faster_music_active=true;
Expand Down

0 comments on commit 3c62047

Please sign in to comment.