From 67f33edbeb758c0aaa5aafe89574c0f7c8a45391 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 24 Jan 2011 20:33:14 +0000 Subject: [PATCH] Fixed 3164026 - lap not counted in snowmountain: when a kart was rescued it would be set to the last valid sector, and the lap count to the last valid lap count. If the kart triggered a lap count while being off track, the lap count would be decremented, but the lap line is already deactivated, so it would not count again. Since the last valid lap count was stored to solve an old problem (being reset to before the lap line would count the lap again), and this is not necessary anymore, the whole storing of last valid lap was removed. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7529 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/modes/linear_world.cpp | 12 +++++------- src/modes/linear_world.hpp | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/modes/linear_world.cpp b/src/modes/linear_world.cpp index b5b6a4685..70af84e66 100644 --- a/src/modes/linear_world.cpp +++ b/src/modes/linear_world.cpp @@ -60,7 +60,6 @@ void LinearWorld::init() KartInfo info; info.m_track_sector = QuadGraph::UNKNOWN_SECTOR; info.m_last_valid_sector = 0; - info.m_last_valid_race_lap = -1; info.m_lap_start_time = 0; m_track->getQuadGraph().findRoadSector(m_karts[n]->getXYZ(), &info.m_track_sector); @@ -202,7 +201,6 @@ void LinearWorld::update(float dt) if(kart_info.m_on_road) { kart_info.m_last_valid_sector = kart_info.m_track_sector; - kart_info.m_last_valid_race_lap = kart_info.m_race_lap; } else { @@ -241,7 +239,7 @@ void LinearWorld::update(float dt) } #ifdef DEBUG - // FIXME: Debug output in case that the double position error occurs again. + // Debug output in case that the double position error occurs again. std::vector pos_used; pos_used.resize(kart_amount+1, -99); for(unsigned int i=0; i 0 ) info.m_track_sector-- ; info.m_last_valid_sector = info.m_track_sector; if ( info.m_last_valid_sector > 0 ) info.m_last_valid_sector --; diff --git a/src/modes/linear_world.hpp b/src/modes/linear_world.hpp index db8a38fd0..3d857fb41 100644 --- a/src/modes/linear_world.hpp +++ b/src/modes/linear_world.hpp @@ -55,7 +55,6 @@ private: * e.g. UNKNOWN_SECTOR can be negative!*/ int m_last_valid_sector; /* used when rescusing, e.g. for invalid shortcuts */ - int m_last_valid_race_lap; /* when a kart is rescued, we need to give it back the number of lap it had */ Vec3 m_curr_track_coords; /** True if the kart is on top of the road path drawn by the drivelines */