From 29ddca404426c0d2713566b83187b9f270fa413e Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 3 Dec 2009 09:10:57 +0000 Subject: [PATCH] Bugfix: the circles representing kart in the minimap had an incorrect colour. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4234 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/states_screens/race_gui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/states_screens/race_gui.cpp b/src/states_screens/race_gui.cpp index cde6b82ec..36309b6d3 100644 --- a/src/states_screens/race_gui.cpp +++ b/src/states_screens/race_gui.cpp @@ -107,6 +107,12 @@ void RaceGUI::createMarkerTexture() // draw2DPolygon() between render() and end(), avoiding the // call to camera->render() camera->render(); + // We have to reset the material here, since otherwise the last + // set material (i.e from the kart selection screen) will be used + // when rednering to the texture. + video::SMaterial m; + m.setTexture(0, NULL); + irr_driver->getVideoDriver()->setMaterial(m); for(unsigned int i=0; igetNumKarts(); i++) { const std::string& kart_ident = race_manager->getKartIdent(i); @@ -116,7 +122,7 @@ void RaceGUI::createMarkerTexture() int count = kp->getShape(); //core::array vertices; video::S3DVertex *vertices = new video::S3DVertex[count+1]; - unsigned short int *index = new unsigned short int[count+1]; + unsigned short int *index = new unsigned short int[count+1]; video::SColor color = kp->getColor(); createRegularPolygon(count, (float)radius, center, color, vertices, index);