9a30372093
Credits to cmangos and trinitycore projects. https://github.com/cmangos/mangos-classic/commit/fd6c640c6ef4afe028180e2d9b8ffc73a20ec902 https://github.com/cmangos/mangos-classic/commit/9b48da5237c90f5be471599f594ccfda4fd07eb9 https://github.com/cmangos/mangos-classic/commit/a391308caf0220f3058ccfc5ab77c3e0b0dff3df https://github.com/cmangos/mangos-classic/commit/def10c862b818c01d947de53167d0c8ed7d81001 https://github.com/cmangos/mangos-classic/commit/46229bb28c6a4362dc4f4ee88e8bdaf962cb1d58 https://github.com/cmangos/mangos-classic/commit/2e7af8455566d7b289c8fa8b00472a9f21ca1494 https://github.com/cmangos/mangos-classic/commit/9cc773b719ddb2498ff91ae9ae90f9cea71f3528 https://github.com/cmangos/mangos-classic/commit/c1d97517b0673769bad1343a0c9f9b24d24ab738 https://github.com/cmangos/mangos-classic/commit/74b1e01542ea3ea65239d1762662134abae43f13 https://github.com/cmangos/mangos-classic/commit/5442ad1d79efc7e3442fd01fdeda9cc7f60b6b64 https://github.com/cmangos/mangos-classic/commit/bfff02bd0eb383c635bf4375695d096080d5c2e0 https://github.com/cmangos/mangos-classic/commit/8daa3ffb6687d38b0912cd19905d03328de82e61 https://github.com/cmangos/mangos-classic/commit/1ede0a03aa61a9d84a883f113baa2c32d27f1a6b https://github.com/cmangos/mangos-classic/commit/ac5a8a60b8a54da9c3b1739307c14ca0a053f738 https://github.com/cmangos/mangos-classic/commit/48a84fbfb6c30d81fb1b7467b071a1512112d50a https://github.com/cmangos/mangos-classic/commit/9d4bc6efa615849aa4f936d90fd3f0b40c0a64d2 https://github.com/cmangos/mangos-classic/commit/3db7b9313c52b415230a29d19ddd256d47019a4a https://github.com/cmangos/mangos-classic/commit/866ec2d489c06c48750774198c2f1ad893c706b3 https://github.com/cmangos/mangos-classic/commit/256cbefafd46a30cc86ab284e86590a469296a14 https://github.com/cmangos/mangos-classic/commit/4b39ff359de2c5a88387634819e58b476ab05202 https://github.com/cmangos/mangos-classic/commit/c6854d16a597fbba3cc27cd8046e418c5cb33d13 https://github.com/cmangos/mangos-classic/commit/7f15528cfc745f38ac23eb4041bb756bdd44234a https://github.com/cmangos/mangos-classic/commit/1b15fa34d3469a16c7df78a37505d9b5f2bd097e https://github.com/cmangos/mangos-classic/commit/64a77261091b408d8dcfbbd7869c173263a23efb https://github.com/cmangos/mangos-classic/commit/7cb695c95826aa7491416fbc285b827c3ff3ebb9 https://github.com/cmangos/mangos-classic/commit/0587095290ce956e42c2d614a83262ae756cc935 https://github.com/cmangos/mangos-classic/commit/09034fb082cca3d60a2cd25aac01a8032c1163e7 https://github.com/cmangos/mangos-classic/commit/9ae1e8bebf36bf94162379c0b4aac27bc2b99636 https://github.com/cmangos/mangos-classic/commit/be83b98f01d5f71e7464bc41c49f74ef0fde009a https://github.com/cmangos/mangos-classic/commit/26c0877cec74c30498d553f2f933012d7a5aecb2 https://github.com/cmangos/mangos-classic/commit/1b3c8ee3c2dc90b0b0082bf2df640d48c9bcb96c https://github.com/cmangos/mangos-classic/commit/6a96d69e839fba35d984835b43af7ca37f4b2688 https://github.com/cmangos/mangos-classic/commit/d9853f1d0e11dcd6ca65f911e38227befdcb691b https://github.com/cmangos/mangos-classic/commit/5afd6a6fd04eec9b61e1bd604b2ef0d910f0b7c2 https://github.com/cmangos/mangos-classic/commit/c3ea0498239e86a6f310458db86ef77090e01eab https://github.com/cmangos/mangos-classic/commit/35bc62ac2b7bf3c97e780724cc4d14b14837660c https://github.com/cmangos/mangos-classic/commit/95fcec8517340f729af08d1397728d0552120f88 https://github.com/cmangos/mangos-classic/commit/a09d1e523b59ba33543a64660555a9e990eacfb9 https://github.com/cmangos/mangos-classic/commit/f6107dfc34fc7c2a2fb27f37678d6fc6f8b96802 https://github.com/cmangos/mangos-classic/commit/af2437976b2e5685f9a5e605d92da4088a402f48 https://github.com/cmangos/mangos-classic/commit/e0c98be3e7ea6e00dd2e23dc0d4cbbb5b308521b https://github.com/cmangos/mangos-classic/commit/ac70b0ef1aec0425e23deca77d761dcf3e9a9a66 https://github.com/cmangos/mangos-classic/commit/0d3fd0d5b8a0710e56a56703e0d8338e33863078 https://github.com/cmangos/mangos-classic/commit/a9393d27649b15398cebaaba01ef05436c6f5ab5 https://github.com/cmangos/mangos-classic/commit/9b38ef751b83cd091267140153a1c383b7c769c4 https://github.com/cmangos/mangos-classic/commit/3208a5e7a722e6d9bd1ee8fae6fc539b55078a7f https://github.com/TrinityCore/TrinityCore/commit/7ddbc18aafe61434971013ed6126f5666011ab43 https://github.com/TrinityCore/TrinityCore/commit/c602220e02bed1ad76c9e60064eeec5fd97bfe80 https://github.com/TrinityCore/TrinityCore/commit/5a980226497605b18f1855fa39f340c10ee9dd53
105 lines
3.7 KiB
Diff
105 lines
3.7 KiB
Diff
From 3790dbcc9cd4bdebbd3257ac8f3f9f28a0cf0485 Mon Sep 17 00:00:00 2001
|
|
From: jackpoz <giacomopoz@gmail.com>
|
|
Date: Fri, 20 Jun 2014 23:15:04 +0200
|
|
Subject: [PATCH] Add custom trinitycore changes
|
|
|
|
---
|
|
Detour/Include/DetourNavMesh.h | 24 ++++++++++++++++++------
|
|
Detour/Source/DetourNavMeshQuery.cpp | 4 ++--
|
|
Recast/Include/Recast.h | 4 ++--
|
|
3 files changed, 22 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/Detour/Include/DetourNavMesh.h b/Detour/Include/DetourNavMesh.h
|
|
index 8ecd57e..f50f705 100644
|
|
--- a/Detour/Include/DetourNavMesh.h
|
|
+++ b/Detour/Include/DetourNavMesh.h
|
|
@@ -25,13 +25,25 @@
|
|
// Undefine (or define in a build cofnig) the following line to use 64bit polyref.
|
|
// Generally not needed, useful for very large worlds.
|
|
// Note: tiles build using 32bit refs are not compatible with 64bit refs!
|
|
-//#define DT_POLYREF64 1
|
|
+#define DT_POLYREF64 1
|
|
|
|
#ifdef DT_POLYREF64
|
|
// TODO: figure out a multiplatform version of uint64_t
|
|
// - maybe: https://code.google.com/p/msinttypes/
|
|
// - or: http://www.azillionmonkeys.com/qed/pstdint.h
|
|
+#if defined(WIN32) && !defined(__MINGW32__)
|
|
+/// Do not rename back to uint64. Otherwise mac complains about typedef redefinition
|
|
+typedef unsigned __int64 uint64_d;
|
|
+#else
|
|
#include <stdint.h>
|
|
+#ifndef uint64_t
|
|
+#ifdef __linux__
|
|
+#include <linux/types.h>
|
|
+#endif
|
|
+#endif
|
|
+/// Do not rename back to uint64. Otherwise mac complains about typedef redefinition
|
|
+typedef uint64_t uint64_d;
|
|
+#endif
|
|
#endif
|
|
|
|
// Note: If you want to use 64-bit refs, change the types of both dtPolyRef & dtTileRef.
|
|
@@ -40,10 +52,10 @@
|
|
/// A handle to a polygon within a navigation mesh tile.
|
|
/// @ingroup detour
|
|
#ifdef DT_POLYREF64
|
|
-static const unsigned int DT_SALT_BITS = 16;
|
|
-static const unsigned int DT_TILE_BITS = 28;
|
|
-static const unsigned int DT_POLY_BITS = 20;
|
|
-typedef uint64_t dtPolyRef;
|
|
+static const unsigned int DT_SALT_BITS = 12;
|
|
+static const unsigned int DT_TILE_BITS = 21;
|
|
+static const unsigned int DT_POLY_BITS = 31;
|
|
+typedef uint64_d dtPolyRef;
|
|
#else
|
|
typedef unsigned int dtPolyRef;
|
|
#endif
|
|
@@ -51,7 +63,7 @@ typedef unsigned int dtPolyRef;
|
|
/// A handle to a tile within a navigation mesh.
|
|
/// @ingroup detour
|
|
#ifdef DT_POLYREF64
|
|
-typedef uint64_t dtTileRef;
|
|
+typedef uint64_d dtTileRef;
|
|
#else
|
|
typedef unsigned int dtTileRef;
|
|
#endif
|
|
diff --git a/Detour/Source/DetourNavMeshQuery.cpp b/Detour/Source/DetourNavMeshQuery.cpp
|
|
index 75af102..a263106 100644
|
|
--- a/Detour/Source/DetourNavMeshQuery.cpp
|
|
+++ b/Detour/Source/DetourNavMeshQuery.cpp
|
|
@@ -3623,7 +3623,7 @@ dtStatus dtNavMeshQuery::findDistanceToWall(dtPolyRef startRef, const float* cen
|
|
dtVsub(hitNormal, centerPos, hitPos);
|
|
dtVnormalize(hitNormal);
|
|
|
|
- *hitDist = dtMathSqrtf(radiusSqr);
|
|
+ *hitDist = sqrtf(radiusSqr);
|
|
|
|
return status;
|
|
}
|
|
diff --git a/Recast/Include/Recast.h b/Recast/Include/Recast.h
|
|
index e85c0d2..79d77e4 100644
|
|
--- a/Recast/Include/Recast.h
|
|
+++ b/Recast/Include/Recast.h
|
|
@@ -263,7 +263,7 @@ struct rcConfig
|
|
};
|
|
|
|
/// Defines the number of bits allocated to rcSpan::smin and rcSpan::smax.
|
|
-static const int RC_SPAN_HEIGHT_BITS = 13;
|
|
+static const int RC_SPAN_HEIGHT_BITS = 16;
|
|
/// Defines the maximum value for rcSpan::smin and rcSpan::smax.
|
|
static const int RC_SPAN_MAX_HEIGHT = (1 << RC_SPAN_HEIGHT_BITS) - 1;
|
|
|
|
@@ -277,7 +277,7 @@ struct rcSpan
|
|
{
|
|
unsigned int smin : RC_SPAN_HEIGHT_BITS; ///< The lower limit of the span. [Limit: < #smax]
|
|
unsigned int smax : RC_SPAN_HEIGHT_BITS; ///< The upper limit of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT]
|
|
- unsigned int area : 6; ///< The area id assigned to the span.
|
|
+ unsigned char area; ///< The area id assigned to the span.
|
|
rcSpan* next; ///< The next span higher up in column.
|
|
};
|
|
|
|
--
|
|
2.9.0.windows.1
|
|
|