Make lap counting works for ghost kart
As no m_terrain_info->update in ghost kart update
This commit is contained in:
parent
7765b43d42
commit
a6c4a72e2c
@ -178,9 +178,10 @@ void LinearWorld::update(float dt)
|
||||
// in the position of the kart (e.g. while falling the kart
|
||||
// might get too close to another part of the track, shortly
|
||||
// jump to position one, then on reset fall back to last)
|
||||
if (!kart_info.getTrackSector()->isOnRoad() &&
|
||||
if ((!kart_info.getTrackSector()->isOnRoad() &&
|
||||
(!kart->getMaterial() ||
|
||||
kart->getMaterial()->isDriveReset()) )
|
||||
kart->getMaterial()->isDriveReset())) &&
|
||||
!kart->isGhostKart())
|
||||
continue;
|
||||
kart_info.getTrackSector()->update(kart->getFrontXYZ());
|
||||
kart_info.m_overall_distance = kart_info.m_race_lap
|
||||
|
Loading…
Reference in New Issue
Block a user