Bugfixes for debug track display.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4035 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2009-09-21 12:51:28 +00:00
parent b9bd631474
commit 66256f64cd

View File

@ -202,8 +202,10 @@ void QuadGraph::createMesh(bool show_invisible)
// Count the number of quads to display (some quads might be invisible
unsigned int n = 0;
for(unsigned int i=0; i<m_all_quads->getNumberOfQuads(); i++)
{
if(show_invisible || !m_all_quads->getQuad(i).isInvisible())
n++;
}
// Four vertices for each of the n-1 remaining quads
video::S3DVertex *new_v = new video::S3DVertex[n*4];
@ -258,7 +260,7 @@ void QuadGraph::createDebugMesh()
// Now colour the quads red/blue/red ...
video::SColor c(255, 255, 0, 0);
video::S3DVertex *v = (video::S3DVertex*)m_mesh_buffer->getVertices();
for(unsigned int i=0; m_mesh_buffer->getVertexCount(); i++)
for(unsigned int i=0; i<m_mesh_buffer->getVertexCount(); i++)
{
// Swap the colours from red to blue and back
c.setRed (i%2 ? 255 : 0);