Small change to the checking of a saved GP. (First commit, don't shoot me if I did anything wrong.)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12788 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
unitraxx 2013-05-26 00:31:22 +00:00
parent 76532a81b5
commit ad3bf48b0d

View File

@ -336,26 +336,27 @@ void RaceManager::startNew(bool from_overworld)
init_gp_rank ++;
}
//We look if Player 1 has a saved version of this GP.
SavedGrandPrix* gp = SavedGrandPrix::getSavedGP( StateManager::get()
->getActivePlayerProfile(0)
->getUniqueID(),
m_grand_prix.getId(),
m_difficulty,
m_num_karts,
m_player_karts.size());
// Start the race with the appropriate track
// =========================================
if(gp != NULL)
m_track_number = 0;
if(m_major_mode==MAJOR_MODE_GRAND_PRIX)
{
m_track_number = gp->getNextTrack();
gp->loadKarts(m_kart_status);
}
else
m_track_number = 0;
//We look if Player 1 has a saved version of this GP.
// =================================================
SavedGrandPrix* gp = SavedGrandPrix::getSavedGP( StateManager::get()
->getActivePlayerProfile(0)
->getUniqueID(),
m_grand_prix.getId(),
m_difficulty,
m_num_karts,
m_player_karts.size());
// Start the race with the appropriate track
// =========================================
if(gp != NULL)
{
m_track_number = gp->getNextTrack();
gp->loadKarts(m_kart_status);
}
}
startNextRace();
} // startNew