diff --git a/src/modes/cutscene_world.cpp b/src/modes/cutscene_world.cpp index bd3671d95..bee2a8b42 100644 --- a/src/modes/cutscene_world.cpp +++ b/src/modes/cutscene_world.cpp @@ -43,6 +43,7 @@ */ CutsceneWorld::CutsceneWorld() : World() { + m_aborted = false; WorldStatus::setClockMode(CLOCK_NONE); m_use_highscores = false; m_play_racestart_sounds = false; @@ -264,7 +265,7 @@ void CutsceneWorld::enterRaceOverState() } } - if (partId == -1 || partId == (int)m_parts.size() - 1) + if (m_aborted || partId == -1 || partId == (int)m_parts.size() - 1) { race_manager->exitRace(); StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance()); diff --git a/src/modes/cutscene_world.hpp b/src/modes/cutscene_world.hpp index 9693902ba..3aa3923a7 100644 --- a/src/modes/cutscene_world.hpp +++ b/src/modes/cutscene_world.hpp @@ -42,10 +42,12 @@ class CutsceneWorld : public World std::map > m_sounds_to_stop; float m_duration; + bool m_aborted; void abortCutscene() { if (m_time < m_duration - 2.0f) m_duration = m_time + 2.0f; + m_aborted = true; } std::vector m_parts; diff --git a/src/modes/world.cpp b/src/modes/world.cpp index 908c98dd7..2a92eef99 100644 --- a/src/modes/world.cpp +++ b/src/modes/world.cpp @@ -246,8 +246,8 @@ Controller* World::loadAIController(AbstractKart *kart) // For now: instead of random switching, use each // robot in turns: switch(m_random.get(NUM_ROBOTS)) #undef USE_PRESENT_AI -#undef USE_SKIDDING_AI -#define USE_ALL_AIS +#define USE_SKIDDING_AI +#undef USE_ALL_AIS #ifdef USE_PRESENT_AI int turn = 2;