- Improved unconnected off-mesh connection debug draw

- Fixed connecting off-mesh links which connect to the same tile x,y but different layer
- Fixed crash in navmehs query closestPointOnPolyInTile() when the poly is off-mesh connection
This commit is contained in:
Mikko Mononen
2012-06-12 03:28:43 +00:00
parent d2b4b09e16
commit 64802ecd0e
6 changed files with 124 additions and 81 deletions

View File

@@ -1053,7 +1053,7 @@ void NavMeshTesterTool::handleRender()
if (m_straightPathFlags[i] & DT_STRAIGHTPATH_OFFMESH_CONNECTION)
col = offMeshCol;
else
col = pathCol;
col = spathCol;
dd.vertex(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2], col);
dd.vertex(m_straightPath[(i+1)*3], m_straightPath[(i+1)*3+1]+0.4f, m_straightPath[(i+1)*3+2], col);
@@ -1070,7 +1070,7 @@ void NavMeshTesterTool::handleRender()
else if (m_straightPathFlags[i] & DT_STRAIGHTPATH_OFFMESH_CONNECTION)
col = offMeshCol;
else
col = pathCol;
col = spathCol;
dd.vertex(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2], spathCol);
}
dd.end();