Detour: Fixed open list bug in pathfinder, nodes were never marked as closed!

Detour: Made the cost function to use polygon edge midpoints instead of polygon centroids.
This commit is contained in:
Mikko Mononen
2009-07-16 11:15:21 +00:00
parent 6fc3d5c58e
commit e1d7b3e1f5
8 changed files with 1861 additions and 2561 deletions

View File

@@ -114,7 +114,7 @@ void Sample_StatMesh::toolRecalc()
{
if (m_sposSet && m_eposSet && m_startRef && m_endRef)
{
m_npolys = m_navMesh->findPath(m_startRef, m_endRef, m_polys, MAX_POLYS);
m_npolys = m_navMesh->findPath(m_startRef, m_endRef, m_spos, m_epos, m_polys, MAX_POLYS);
if (m_npolys)
m_nstraightPath = m_navMesh->findStraightPath(m_spos, m_epos, m_polys, m_npolys, m_straightPath, MAX_POLYS);
}