Merge pull request #54 from Kromster80/var

Removed unnecessary variable assignment
This commit is contained in:
Mikko Mononen 2014-12-13 13:44:45 +02:00
commit b869953fd2
4 changed files with 6 additions and 6 deletions

View File

@ -717,7 +717,7 @@ dtPolyRef dtNavMesh::findNearestPolyInTile(const dtMeshTile* tile,
float closestPtPoly[3];
float diff[3];
bool posOverPoly = false;
float d = 0;
float d;
closestPointOnPoly(ref, center, closestPtPoly, &posOverPoly);
// If a point is directly over a polygon and closer than

View File

@ -281,7 +281,7 @@ void dtObstacleAvoidanceQuery::prepare(const float* pos, const float* dvel)
const float* pa = pos;
const float* pb = cir->p;
const float orig[3] = {0,0};
const float orig[3] = {0,0,0};
float dv[3];
dtVsub(cir->dp,pb,pa);
dtVnormalize(cir->dp);
@ -614,4 +614,4 @@ int dtObstacleAvoidanceQuery::sampleVelocityAdaptive(const float* pos, const flo
dtVcopy(nvel, res);
return ns;
}
}

View File

@ -50,7 +50,7 @@ static rcSpan* allocSpan(rcHeightfield& hf)
// Allocate memory for the new pool.
rcSpanPool* pool = (rcSpanPool*)rcAlloc(sizeof(rcSpanPool), RC_ALLOC_PERM);
if (!pool) return 0;
pool->next = 0;
// Add the pool into the list of pools.
pool->next = hf.pools;
hf.pools = pool;

View File

@ -1143,7 +1143,7 @@ void NavMeshTesterTool::handleRender()
dd.begin(DU_DRAW_LINES, 2.0f);
for (int i = 0; i < m_nstraightPath-1; ++i)
{
unsigned int col = 0;
unsigned int col;
if (m_straightPathFlags[i] & DT_STRAIGHTPATH_OFFMESH_CONNECTION)
col = offMeshCol;
else
@ -1156,7 +1156,7 @@ void NavMeshTesterTool::handleRender()
dd.begin(DU_DRAW_POINTS, 6.0f);
for (int i = 0; i < m_nstraightPath; ++i)
{
unsigned int col = 0;
unsigned int col;
if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START)
col = startCol;
else if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START)