tools improvement (#926)

* tools improvement

* added "Source/DetourAssert.cpp" to recastnavigation/Detour/CMakeLists.txt

* increased MMAP and VMAP version numbers

* Will need to re extract MMAPS and VMAPS
This commit is contained in:
Stoabrogga
2018-07-13 13:46:04 +02:00
committed by Lee
parent 02d14df9b8
commit a18d1474a3
22 changed files with 256 additions and 97 deletions

View File

@@ -342,8 +342,8 @@ void dtRandomPointInConvexPoly(const float* pts, const int npts, float* areas,
// Find sub triangle weighted by area.
const float thr = s*areasum;
float acc = 0.0f;
float u = 0.0f;
int tri = 0;
float u = 1.0f;
int tri = npts - 1;
for (int i = 2; i < npts; i++) {
const float dacc = areas[i];
if (thr >= acc && thr < (acc+dacc))