Remove "Final lap!" message in one-lap races (#3127)

* Fix "Final lap!" message on one-lap races

When starting a one-lap race, the game gives the message "Final lap!". This should only be given when there is more than one lap in the race. This commit changes linear_world.cpp so that this message is only given when the number of laps in the race is greater than 1.

* Fix spacing

I accidentally changed the spacing when making my last commit. This commit fixes that accident.
This commit is contained in:
Ethan Uzarowski 2018-02-23 20:43:46 -05:00 committed by auriamg
parent bfb862645d
commit b782af2949

View File

@ -284,8 +284,11 @@ void LinearWorld::newLap(unsigned int kart_index)
// Last lap message (kart_index's assert in previous block already)
if (raceHasLaps() && kart_info.m_race_lap+1 == lap_count)
{
m_race_gui->addMessage(_("Final lap!"), kart,
if (lap_count > 1)
{
m_race_gui->addMessage(_("Final lap!"), kart,
3.0f, GUIEngine::getSkin()->getColor("font::normal"), true);
}
if(!m_last_lap_sfx_played && lap_count > 1)
{
if (UserConfigParams::m_music)