Permalink
Browse files

Fixed using the last used track when specifying -N.

  • Loading branch information...
1 parent e33fc3c commit d72decfa651af37137538be81e8d78ae01ffc0e8 @hiker hiker committed Jun 12, 2014
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/main.cpp
View
@@ -405,7 +405,7 @@ void setupRaceStart()
StateManager::get()->createActivePlayer(
PlayerManager::get()->getPlayer(0), device);
- if (kart_properties_manager->getKart(UserConfigParams::m_default_kart) == NULL)
+ if (!kart_properties_manager->getKart(UserConfigParams::m_default_kart))
{
Log::warn("main", "Kart '%s' is unknown so will use the "
"default kart.",
@@ -418,6 +418,13 @@ void setupRaceStart()
race_manager->setLocalKartInfo(0, UserConfigParams::m_default_kart);
}
+ if(!track_manager->getTrack(UserConfigParams::m_last_track))
+ {
+ race_manager->setTrack("jungle");
+ }
+ else
+ race_manager->setTrack(UserConfigParams::m_last_track);
+
// ASSIGN should make sure that only input from assigned devices
// is read.
input_manager->getDeviceList()->setAssignMode(ASSIGN);

0 comments on commit d72decf

Please sign in to comment.