Player marker on both minimaps (#7350)
authornanoproject <eldorian@email.cz>
Fri, 18 May 2018 20:45:14 +0000 (22:45 +0200)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Fri, 18 May 2018 20:45:14 +0000 (22:45 +0200)
src/minimap.cpp

index 98bb7d9c38a32b03c410650aafe19e3e5ec54292..4d83c088addf9013f4999775bbd571514c372be8 100644 (file)
@@ -511,16 +511,18 @@ void Minimap::drawMinimap()
        driver->setMaterial(material);
        driver->drawMeshBuffer(m_meshbuffer);
 
-       // If round minimap, draw player marker
-       if (!data->minimap_shape_round) {
+       // Draw player marker on minimap
+       if (data->minimap_shape_round) {
+               matrix.setRotationDegrees(core::vector3df(0, 0, 0));
+       } else {
                matrix.setRotationDegrees(core::vector3df(0, 0, m_angle));
-               material.TextureLayer[0].Texture = data->player_marker;
-
-               driver->setTransform(video::ETS_WORLD, matrix);
-               driver->setMaterial(material);
-               driver->drawMeshBuffer(m_meshbuffer);
        }
 
+       material.TextureLayer[0].Texture = data->player_marker;
+       driver->setTransform(video::ETS_WORLD, matrix);
+       driver->setMaterial(material);
+       driver->drawMeshBuffer(m_meshbuffer);
+
        // Reset transformations
        driver->setTransform(video::ETS_VIEW, oldViewMat);
        driver->setTransform(video::ETS_PROJECTION, oldProjMat);