diff options
author | nanoproject <eldorian@email.cz> | 2018-05-18 22:45:14 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-05-18 22:45:14 +0200 |
commit | 8295f9f89b7e800fe39c2bc9b5638b1fed2c30d8 (patch) | |
tree | b40b9561096ba1f047a51be366c5fb503fa112e0 | |
parent | 3eb363f813bfc4fbca250579848532ef296b3077 (diff) | |
download | minetest-8295f9f89b7e800fe39c2bc9b5638b1fed2c30d8.tar.gz minetest-8295f9f89b7e800fe39c2bc9b5638b1fed2c30d8.tar.bz2 minetest-8295f9f89b7e800fe39c2bc9b5638b1fed2c30d8.zip |
Player marker on both minimaps (#7350)
-rw-r--r-- | src/minimap.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/minimap.cpp b/src/minimap.cpp index 98bb7d9c3..4d83c088a 100644 --- a/src/minimap.cpp +++ b/src/minimap.cpp @@ -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); |