mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix rare crash in naveditor
Running tests in the naveditor without building navigation segfaults the application. Reduced verbose prints when building navigation.
This commit is contained in:
parent
3ad668e37a
commit
a778d910e7
@ -440,10 +440,9 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData,
|
|||||||
detailMeshesSize + detailVertsSize + detailTrisSize +
|
detailMeshesSize + detailVertsSize + detailTrisSize +
|
||||||
bvTreeSize + offMeshConsSize+ sthSize;
|
bvTreeSize + offMeshConsSize+ sthSize;
|
||||||
|
|
||||||
printf("%i %i %i %i(%i links) %i %i %i %i %i\n", headerSize, vertsSize, polysSize, linksSize, maxLinkCount, detailMeshesSize, detailVertsSize, detailTrisSize, bvTreeSize, offMeshConsSize);
|
//printf("%i %i %i %i(%i links) %i %i %i %i %i\n", headerSize, vertsSize, polysSize, linksSize, maxLinkCount, detailMeshesSize, detailVertsSize, detailTrisSize, bvTreeSize, offMeshConsSize);
|
||||||
|
//printf("%i\n", dataSize);
|
||||||
|
|
||||||
|
|
||||||
printf("%i\n", dataSize);
|
|
||||||
unsigned char* data = (unsigned char*)dtAlloc(sizeof(unsigned char)*dataSize, DT_ALLOC_PERM);
|
unsigned char* data = (unsigned char*)dtAlloc(sizeof(unsigned char)*dataSize, DT_ALLOC_PERM);
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,7 @@ dtStatus dtNavMeshQuery::findRandomPoint(const dtQueryFilter* filter, float (*fr
|
|||||||
{
|
{
|
||||||
dtAssert(m_nav);
|
dtAssert(m_nav);
|
||||||
|
|
||||||
if (!filter || !frand || !randomRef || !randomPt)
|
if (!m_nav || !filter || !frand || !randomRef || !randomPt)
|
||||||
return DT_FAILURE | DT_INVALID_PARAM;
|
return DT_FAILURE | DT_INVALID_PARAM;
|
||||||
|
|
||||||
// Randomly pick one tile. Assume that all tiles cover roughly the same area.
|
// Randomly pick one tile. Assume that all tiles cover roughly the same area.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user