From 73339a95103e5463c7479d37bfb2ca8fcc353be3 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 2 Sep 2010 22:35:16 +0000 Subject: [PATCH] Fixed problem with result screen in follow the leader moder. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5873 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/states_screens/race_result_gui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/states_screens/race_result_gui.cpp b/src/states_screens/race_result_gui.cpp index 5cf8bc17e..4e24ce87a 100644 --- a/src/states_screens/race_result_gui.cpp +++ b/src/states_screens/race_result_gui.cpp @@ -257,6 +257,9 @@ void RaceResultGUI::determineTableLayout() m_width_kart_name = rect.Width; } // for i < order.size() + // Make sure the empty rows (due to deleted karts) are not used anymore + m_all_row_infos.resize(num_karts); + std::string max_time = StringUtils::timeToString(max_finish_time); core::stringw string_max_time(max_time.c_str()); core::dimension2du r = m_font->getDimension(string_max_time.c_str()); @@ -385,7 +388,7 @@ void RaceResultGUI::renderGlobal(float dt) m_timer += dt; World *world = World::getWorld(); assert(world->getPhase()==WorldStatus::RESULT_DISPLAY_PHASE); - unsigned int num_karts = world->getNumKarts(); + unsigned int num_karts = m_all_row_infos.size(); // First: Update the finite state machine // ======================================