swordlegend / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

NavMeshTesterTool not drawing correctly #234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I commented code that is incorrect and added code that does what was originally 
intended.

            dd.end();
            dd.begin(DU_DRAW_POINTS, 6.0f);
            for (int i = 0; i < m_nstraightPath; ++i)
            {
                unsigned int col = 0;
                if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START)
                    col = startCol;
                //else if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START)
                else if (m_straightPathFlags[i] & DT_STRAIGHTPATH_END)
                    col = endCol;
                else if (m_straightPathFlags[i] & DT_STRAIGHTPATH_OFFMESH_CONNECTION)
                    col = offMeshCol;
                else
                    col = spathCol;
                //dd.vertex(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2], spathCol);
                dd.vertex(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2], col);
            }
            dd.end();

Original issue reported on code.google.com by ThodenTh...@gmail.com on 22 Mar 2013 at 6:30

GoogleCodeExporter commented 9 years ago
Fixed at github repo
https://github.com/memononen/recastnavigation

Original comment by memono...@gmail.com on 17 Sep 2013 at 7:10