summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libs/enet/include/enet/enet.h2
-rw-r--r--src/game-server/collisiondetection.cpp3
-rw-r--r--src/utils/mathutils.cpp4
3 files changed, 8 insertions, 1 deletions
diff --git a/libs/enet/include/enet/enet.h b/libs/enet/include/enet/enet.h
index 716635b..741e87b 100644
--- a/libs/enet/include/enet/enet.h
+++ b/libs/enet/include/enet/enet.h
@@ -12,7 +12,7 @@ extern "C"
#include <stdlib.h>
-#ifdef WIN32
+#ifdef _WIN32
#include "enet/win32.h"
#else
#include "enet/unix.h"
diff --git a/src/game-server/collisiondetection.cpp b/src/game-server/collisiondetection.cpp
index bf8c7ce..562f440 100644
--- a/src/game-server/collisiondetection.cpp
+++ b/src/game-server/collisiondetection.cpp
@@ -27,6 +27,9 @@
#define D_TO_R 0.0174532925 // PI / 180
#define R_TO_D 57.2957795 // 180 / PI
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
// Tests to see if pos is between s1 degree and s2
#define test_degrees(pos,s1,s2) (pos > s1 && pos < s2) || (s1 > s2 && !(pos < s1 && pos > s2))
diff --git a/src/utils/mathutils.cpp b/src/utils/mathutils.cpp
index 3208fb5..6f7bc22 100644
--- a/src/utils/mathutils.cpp
+++ b/src/utils/mathutils.cpp
@@ -25,6 +25,10 @@
#include <string.h>
#include <float.h>
+#ifndef M_PI_2
+#define M_PI_2 1.57079632679489661923
+#endif
+
static const int MATH_UTILS_MAX_ANGLE = 360;
static float sinList[MATH_UTILS_MAX_ANGLE];