$OpenBSD$ --- source/vdrift/ai.cpp.orig Mon Jul 15 02:36:01 2013 +++ source/vdrift/ai.cpp Mon Jul 15 02:36:30 2013 @@ -346,7 +346,7 @@ void AI::updateGasBrake(AI_Car *c, float dt, TRACK* tr } gas_value = 0.0; } - else if (isnan(speed_diff) || speed_diff > MAX_SPEED_DIFF) + else if (std::isnan(speed_diff) || speed_diff > MAX_SPEED_DIFF) { gas_value = 1.0; brake_value = 0.0; @@ -454,8 +454,8 @@ void AI::calcMu(AI_Car *c, TRACK* track_p) float long_mu = FRICTION_FACTOR_LONG * long_friction / c->car->GetMass() / GRAVITY; float lat_mu = FRICTION_FACTOR_LAT * lat_friction / c->car->GetMass() / GRAVITY; - if (!isnan(long_mu)) c->longitude_mu = long_mu; - if (!isnan(lat_mu)) c->lateral_mu = lat_mu; + if (!std::isnan(long_mu)) c->longitude_mu = long_mu; + if (!std::isnan(lat_mu)) c->lateral_mu = lat_mu; } float AI::calcSpeedLimit(AI_Car *c, const BEZIER* patch, const BEZIER * nextpatch, float friction, float extraradius=0) @@ -605,7 +605,7 @@ void AI::updateSteer(AI_Car *c, float dt, const std::l if (steer_value > 1.0) steer_value = 1.0; else if (steer_value < -1.0) steer_value = -1.0; - assert(!isnan(steer_value)); + assert(!std::isnan(steer_value)); c->inputs[CARINPUT::STEER_RIGHT] = steer_value; }