Fixed lap counting: sometimes karts would get a 'distance along track'
after crossing the lap counting line that's larger than 2. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6821 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e137c16788
commit
c6607f4dbc
@ -64,7 +64,7 @@ bool CheckLap::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx)
|
|||||||
float current_distance =
|
float current_distance =
|
||||||
((LinearWorld*)World::getWorld())->getDistanceDownTrackForKart(indx);
|
((LinearWorld*)World::getWorld())->getDistanceDownTrackForKart(indx);
|
||||||
bool result =(m_previous_distance[indx]>0.95f*track_length &&
|
bool result =(m_previous_distance[indx]>0.95f*track_length &&
|
||||||
current_distance<2.0f);
|
current_distance<7.0f);
|
||||||
if(UserConfigParams::m_check_debug && result)
|
if(UserConfigParams::m_check_debug && result)
|
||||||
{
|
{
|
||||||
printf("CHECK: Kart %s crossed start line from %f to %f.\n",
|
printf("CHECK: Kart %s crossed start line from %f to %f.\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user