|
|
@@ -16,6 +16,8 @@
|
|
|
// 3. This notice may not be removed or altered from any source distribution.
|
|
|
//
|
|
|
|
|
|
+// Modified by cosmy1 for Urho3D
|
|
|
+
|
|
|
#include <string.h>
|
|
|
#include <new>
|
|
|
#include "DetourProximityGrid.h"
|
|
|
@@ -45,7 +47,7 @@ inline int hashPos2(int x, int y, int n)
|
|
|
return ((x*73856093) ^ (y*19349663)) & (n-1);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+// Urho3D: initialize all class members
|
|
|
dtProximityGrid::dtProximityGrid() :
|
|
|
m_maxItems(0),
|
|
|
m_cellSize(0),
|
|
|
@@ -53,8 +55,10 @@ dtProximityGrid::dtProximityGrid() :
|
|
|
m_poolHead(0),
|
|
|
m_poolSize(0),
|
|
|
m_buckets(0),
|
|
|
- m_bucketsSize(0)
|
|
|
+ m_bucketsSize(0),
|
|
|
+ m_invCellSize(0) // Urho3D
|
|
|
{
|
|
|
+ memset(&m_bounds, 0, sizeof(m_bounds)); // Urho3D
|
|
|
}
|
|
|
|
|
|
dtProximityGrid::~dtProximityGrid()
|