From ad799ed99044e21ebb1f7f6dd0a303dd990a89e3 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 13 Jul 2009 12:21:12 +0000 Subject: [PATCH] Bugfix: non-active checklines did not save the previous position, resulting in incorrect triggering later. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3742 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/tracks/check_structure.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tracks/check_structure.cpp b/src/tracks/check_structure.cpp index 932b75e4f..7d3bce9d3 100644 --- a/src/tracks/check_structure.cpp +++ b/src/tracks/check_structure.cpp @@ -67,10 +67,9 @@ void CheckStructure::update(float dt) { for(unsigned int i=0; igetNumKarts(); i++) { - // Ignore all non-active checklines. - if(!m_is_active[i]) continue; const Vec3 &xyz = race_manager->getKart(i)->getXYZ(); - if(isTriggered(m_previous_position[i], xyz, i)) + // Only check active checklines. + if(m_is_active[i] && isTriggered(m_previous_position[i], xyz, i)) { trigger(i); }