Merge pull request #54 from Kromster80/var
Removed unnecessary variable assignment
This commit is contained in:
commit
b869953fd2
@ -717,7 +717,7 @@ dtPolyRef dtNavMesh::findNearestPolyInTile(const dtMeshTile* tile,
|
|||||||
float closestPtPoly[3];
|
float closestPtPoly[3];
|
||||||
float diff[3];
|
float diff[3];
|
||||||
bool posOverPoly = false;
|
bool posOverPoly = false;
|
||||||
float d = 0;
|
float d;
|
||||||
closestPointOnPoly(ref, center, closestPtPoly, &posOverPoly);
|
closestPointOnPoly(ref, center, closestPtPoly, &posOverPoly);
|
||||||
|
|
||||||
// If a point is directly over a polygon and closer than
|
// If a point is directly over a polygon and closer than
|
||||||
|
@ -281,7 +281,7 @@ void dtObstacleAvoidanceQuery::prepare(const float* pos, const float* dvel)
|
|||||||
const float* pa = pos;
|
const float* pa = pos;
|
||||||
const float* pb = cir->p;
|
const float* pb = cir->p;
|
||||||
|
|
||||||
const float orig[3] = {0,0};
|
const float orig[3] = {0,0,0};
|
||||||
float dv[3];
|
float dv[3];
|
||||||
dtVsub(cir->dp,pb,pa);
|
dtVsub(cir->dp,pb,pa);
|
||||||
dtVnormalize(cir->dp);
|
dtVnormalize(cir->dp);
|
||||||
|
@ -50,7 +50,7 @@ static rcSpan* allocSpan(rcHeightfield& hf)
|
|||||||
// Allocate memory for the new pool.
|
// Allocate memory for the new pool.
|
||||||
rcSpanPool* pool = (rcSpanPool*)rcAlloc(sizeof(rcSpanPool), RC_ALLOC_PERM);
|
rcSpanPool* pool = (rcSpanPool*)rcAlloc(sizeof(rcSpanPool), RC_ALLOC_PERM);
|
||||||
if (!pool) return 0;
|
if (!pool) return 0;
|
||||||
pool->next = 0;
|
|
||||||
// Add the pool into the list of pools.
|
// Add the pool into the list of pools.
|
||||||
pool->next = hf.pools;
|
pool->next = hf.pools;
|
||||||
hf.pools = pool;
|
hf.pools = pool;
|
||||||
|
@ -1143,7 +1143,7 @@ void NavMeshTesterTool::handleRender()
|
|||||||
dd.begin(DU_DRAW_LINES, 2.0f);
|
dd.begin(DU_DRAW_LINES, 2.0f);
|
||||||
for (int i = 0; i < m_nstraightPath-1; ++i)
|
for (int i = 0; i < m_nstraightPath-1; ++i)
|
||||||
{
|
{
|
||||||
unsigned int col = 0;
|
unsigned int col;
|
||||||
if (m_straightPathFlags[i] & DT_STRAIGHTPATH_OFFMESH_CONNECTION)
|
if (m_straightPathFlags[i] & DT_STRAIGHTPATH_OFFMESH_CONNECTION)
|
||||||
col = offMeshCol;
|
col = offMeshCol;
|
||||||
else
|
else
|
||||||
@ -1156,7 +1156,7 @@ void NavMeshTesterTool::handleRender()
|
|||||||
dd.begin(DU_DRAW_POINTS, 6.0f);
|
dd.begin(DU_DRAW_POINTS, 6.0f);
|
||||||
for (int i = 0; i < m_nstraightPath; ++i)
|
for (int i = 0; i < m_nstraightPath; ++i)
|
||||||
{
|
{
|
||||||
unsigned int col = 0;
|
unsigned int col;
|
||||||
if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START)
|
if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START)
|
||||||
col = startCol;
|
col = startCol;
|
||||||
else if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START)
|
else if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user