From cd250f3fec21aecf2e389290366afb41ec9721b1 Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Wed, 17 Aug 2016 10:14:13 +0200 Subject: [PATCH] Some corrections to previous commits --- modules/acore/deps/mysqllite/include/my_global.h | 7 +++++-- .../MovementGenerators/RandomMovementGenerator.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/acore/deps/mysqllite/include/my_global.h b/modules/acore/deps/mysqllite/include/my_global.h index 3bd3f219c..dd0a18f7a 100644 --- a/modules/acore/deps/mysqllite/include/my_global.h +++ b/modules/acore/deps/mysqllite/include/my_global.h @@ -786,9 +786,12 @@ inline unsigned long long my_double2ulonglong(double d) #define SIZE_T_MAX (~((size_t) 0)) #endif -#ifndef isfinite +#ifdef HAVE_FINITE +#define isfinite(x) finite(x) +#else +#define finite(x) (1.0 / fabs(x) > 0.0) +#endif /* HAVE_FINITE */ #define isfinite(x) (1.0 / fabs(x) > 0.0) -#endif /* isfinite */ #ifndef HAVE_ISNAN #define isnan(x) ((x) != (x)) diff --git a/src/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index c7f0e101c..851739298 100644 --- a/src/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -138,7 +138,7 @@ void RandomMovementGenerator::_setRandomLocation(Creature* creature) // Xinef: tree climbing, cut as much as we can if (zDiff > 2.0f || - (G3D::fuzzyNe(zDiff, 0.0f) && distDiff / zDiff < 2.15f)) // ~25� + (G3D::fuzzyNe(zDiff, 0.0f) && distDiff / zDiff < 2.15f)) // ~25˚ { _validPointsVector[_currentPoint].erase(randomIter); _preComputedPaths.erase(pathIdx);