There were two issues discovered:
- Triangles mapping didn't free in buildNavMeshData if there's no recast data for an object
- KX_NavMeshObject used not-guarded allocation for polygons storage, but used guarded
freeing stuff to free used memory, producing error messages in the console and leading to
memory leak.
Wasn't actually harmful for users -- there was no memory corruptions and error happens only
when object was set up in a way when navmesh can't work in theory.
- Upgrade Recast library to latest portable version
- Implement recast_qsort based on FreeBSD qsort.c to have
portable thread safe quick sort for use in conversion routine.
- Better default value for the Build Navigation Mesh operator
and it's callback.
Also do not use char constants like 'NAVM' which is casting to int.
And added defautl section to switch in KX_NavMeshObject::DrawNavMesh.
- rearrange structs to work for 64bit
- define all vars before goto's
- ifdefs for qsort_r/qsort_s
- dont cast pointers to int only for NULL checks
- dont printf STR_String directly, get the char pointer from it
also minor change to gpu py module, no need to pass empty tuple to PyObject_CallObject, can just be NULL
- modified conversion process to take into account changes caused by mesh editing
Note: conversion to dtStatNavMesh in KX_NavMeshObject hasn't worked correctly yet
- fixed the access to KX_SteeringActuator attributes from scripts
- added enum members for KX_SteeringActuator and KX_NavMeshObject to GameLogic dictionary
- obstacle culling for correct simulation in 3d
- flag for steering actuator termination on reaching target
- path recalculation period
- advance by waypoints (for path following)
- creation obstacle on object replication (including navmesh object)
- creation object transform for navigation mesh directly from blender object instead of using SGNode world transform (because SGNode doesn't exists yet when building navmesh on ProcessReplica)