Pressing escape cancels both parts of the cutscene
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11503 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
cd0ba32a65
commit
81966f33d6
@ -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());
|
||||
|
@ -42,10 +42,12 @@ class CutsceneWorld : public World
|
||||
std::map<float, std::vector<TrackObject*> > 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<std::string> m_parts;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user