Skip to content

Commit

Permalink
Player marker on both minimaps (#7350)
Browse files Browse the repository at this point in the history
  • Loading branch information
OhFuckMe authored and nerzhul committed May 18, 2018
1 parent 3eb363f commit 8295f9f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/minimap.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 8295f9f

Please sign in to comment.