ports/games/speeddreams/patches/patch-src_libs_robottools_rthumandriver_cpp

12 lines
599 B
Text

Index: src/libs/robottools/rthumandriver.cpp
--- src/libs/robottools/rthumandriver.cpp.orig
+++ src/libs/robottools/rthumandriver.cpp
@@ -1462,7 +1462,7 @@ static void common_drive(const int index, tCarElt* car
}
ax0 = ax0 * cmd[CMD_THROTTLE].pow;
car->_accelCmd = pow(fabs(ax0), 1.0f / cmd[CMD_THROTTLE].sens) / (1.0 + cmd[CMD_THROTTLE].spdSens * car->_speed_x / 1000.0);
- if (isnan (car->_accelCmd)) {
+ if (std::isnan (car->_accelCmd)) {
car->_accelCmd = 0;
}
/* printf(" axO:%f accelCmd:%f\n", ax0, car->_accelCmd); */