aboutsummaryrefslogtreecommitdiff
path: root/dep/recastnavigation/Recast/Recast.cpp
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-02-13 22:19:56 +0100
committerjackpoz <giacomopoz@gmail.com>2014-02-13 22:19:56 +0100
commit006d72a8289a3956bc06f528c457e350227e0cef (patch)
treed2cc0beb1aba63e5a4c112e7a6e2a8d1918f425b /dep/recastnavigation/Recast/Recast.cpp
parentb9db1ab24e4f818a5eedb00f1992139920855d3d (diff)
Core/MMAPS: Fix invisible wall issue in MMAPS.
Fix invisible wall issues in MMAPS caused by tile connections not being extracted correctly. This reverts aa645683b8b25bfb35cb977678daf5c56c1531e6 and restores an old version of recastnavigation, most likely https://github.com/memononen/recastnavigation/commit/1be9de72d87dcfdecf6bea30f5461745f7d7afe6 . Re-extracting MMAPS is required.
Diffstat (limited to 'dep/recastnavigation/Recast/Recast.cpp')
-rw-r--r--dep/recastnavigation/Recast/Recast.cpp30
1 files changed, 4 insertions, 26 deletions
diff --git a/dep/recastnavigation/Recast/Recast.cpp b/dep/recastnavigation/Recast/Recast.cpp
index 803daac3bcf..922c9163c13 100644
--- a/dep/recastnavigation/Recast/Recast.cpp
+++ b/dep/recastnavigation/Recast/Recast.cpp
@@ -109,28 +109,6 @@ void rcFreeCompactHeightfield(rcCompactHeightfield* chf)
rcFree(chf);
}
-
-rcHeightfieldLayerSet* rcAllocHeightfieldLayerSet()
-{
- rcHeightfieldLayerSet* lset = (rcHeightfieldLayerSet*)rcAlloc(sizeof(rcHeightfieldLayerSet), RC_ALLOC_PERM);
- memset(lset, 0, sizeof(rcHeightfieldLayerSet));
- return lset;
-}
-
-void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet* lset)
-{
- if (!lset) return;
- for (int i = 0; i < lset->nlayers; ++i)
- {
- rcFree(lset->layers[i].heights);
- rcFree(lset->layers[i].areas);
- rcFree(lset->layers[i].cons);
- }
- rcFree(lset->layers);
- rcFree(lset);
-}
-
-
rcContourSet* rcAllocContourSet()
{
rcContourSet* cset = (rcContourSet*)rcAlloc(sizeof(rcContourSet), RC_ALLOC_PERM);
@@ -439,13 +417,13 @@ bool rcBuildCompactHeightfield(rcContext* ctx, const int walkableHeight, const i
if ((top - bot) >= walkableHeight && rcAbs((int)ns.y - (int)s.y) <= walkableClimb)
{
// Mark direction as walkable.
- const int lidx = k - (int)nc.index;
- if (lidx < 0 || lidx > MAX_LAYERS)
+ const int idx = k - (int)nc.index;
+ if (idx < 0 || idx > MAX_LAYERS)
{
- tooHighNeighbour = rcMax(tooHighNeighbour, lidx);
+ tooHighNeighbour = rcMax(tooHighNeighbour, idx);
continue;
}
- rcSetCon(s, dir, lidx);
+ rcSetCon(s, dir, idx);
break;
}
}