/** This function is called each timestep, and it collects most of the
 *  statistics for this kart.
 *  \param dt Time step size.
 */
void KartWithStats::update(int ticks)
{
    Kart::update(ticks);
    if(getSpeed()>m_top_speed        ) m_top_speed = getSpeed();
    float dt = stk_config->ticks2Time(ticks);
    if(getControls().getSkidControl()) m_skidding_time += dt;
    if(getControls().getBrake()      ) m_brake_count ++;
    LinearWorld *world = dynamic_cast<LinearWorld*>(World::getWorld());
    if(world && !world->isOnRoad(getWorldKartId()))
        m_off_track_count ++;
}   // update
/** This function is called each timestep, and it collects most of the 
 *  statistics for this kart.
 *  \param dt Time step size.
 */
void KartWithStats::update(float dt)
{
    Kart::update(dt);
    if(getSpeed()>m_top_speed) m_top_speed = getSpeed();
    if(getControls().m_skid)
        m_skidding_time += dt;
    if(getControls().m_brake)
        m_brake_count ++;
    LinearWorld *world = dynamic_cast<LinearWorld*>(World::getWorld());
    if(world && !world->isOnRoad(getWorldKartId()))
        m_off_track_count ++;
}   // update