Fix memory management issue
This commit is contained in:
parent
aa81925860
commit
52b3d533f5
@ -60,16 +60,21 @@ GUIEngine::EventPropagation
|
|||||||
|
|
||||||
if(selection == "start")
|
if(selection == "start")
|
||||||
{
|
{
|
||||||
|
bool reverse = m_rd.m_reverse;
|
||||||
|
std::string track_name = m_rd.m_track_name;
|
||||||
|
int laps = m_rd.m_laps;
|
||||||
|
int replay_id = m_replay_id;
|
||||||
|
|
||||||
ModalDialog::dismiss();
|
ModalDialog::dismiss();
|
||||||
ReplayPlay::get()->setReplayFile(m_replay_id);
|
ReplayPlay::get()->setReplayFile(replay_id);
|
||||||
race_manager->setRaceGhostKarts(true);
|
race_manager->setRaceGhostKarts(true);
|
||||||
race_manager->setNumKarts(race_manager->getNumLocalPlayers());
|
race_manager->setNumKarts(race_manager->getNumLocalPlayers());
|
||||||
|
|
||||||
// Disable accidentally unlocking of a challenge
|
// Disable accidentally unlocking of a challenge
|
||||||
PlayerManager::getCurrentPlayer()->setCurrentChallenge("");
|
PlayerManager::getCurrentPlayer()->setCurrentChallenge("");
|
||||||
|
|
||||||
race_manager->setReverseTrack(m_rd.m_reverse);
|
race_manager->setReverseTrack(reverse);
|
||||||
race_manager->startSingleRace(m_rd.m_track_name, m_rd.m_laps, false);
|
race_manager->startSingleRace(track_name, laps, false);
|
||||||
return GUIEngine::EVENT_BLOCK;
|
return GUIEngine::EVENT_BLOCK;
|
||||||
}
|
}
|
||||||
else if(selection == "remove")
|
else if(selection == "remove")
|
||||||
|
Loading…
Reference in New Issue
Block a user