From 1987c155f070bbea31219b61bf3b5c98dee8f41c Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 15 Nov 2010 09:47:44 +0000 Subject: [PATCH] If no valid start position is found, automatically enter flying mode (in debug compilations). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6566 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/modes/world.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modes/world.cpp b/src/modes/world.cpp index a251e16d0..e4a26335a 100644 --- a/src/modes/world.cpp +++ b/src/modes/world.cpp @@ -348,7 +348,13 @@ void World::resetAllKarts() { fprintf(stderr, "ERROR: no valid starting position for kart %d on track %s.\n", (int)(i-m_karts.begin()), m_track->getIdent().c_str()); +#ifdef DEBUG + fprintf(stderr, "Activating fly mode.\n"); + (*i)->flyUp(); + continue; +#else exit(-1); +#endif } } @@ -385,8 +391,14 @@ void World::resetAllKarts() if(!material) { fprintf(stderr, "ERROR: no valid starting position for kart %d on track %s.\n", - (int)(i-m_karts.begin()), m_track->getIdent().c_str()); + (int)(i-m_karts.begin()), m_track->getIdent().c_str()); +#ifdef DEBUG + fprintf(stderr, "Activating fly mode.\n"); + (*i)->flyUp(); + continue; +#else exit(-1); +#endif } all_finished=false; break;