forked from Mirrorlandia_minetest/minetest
Player marker on both minimaps (#7350)
This commit is contained in:
parent
3eb363f813
commit
8295f9f89b
@ -511,16 +511,18 @@ void Minimap::drawMinimap()
|
|||||||
driver->setMaterial(material);
|
driver->setMaterial(material);
|
||||||
driver->drawMeshBuffer(m_meshbuffer);
|
driver->drawMeshBuffer(m_meshbuffer);
|
||||||
|
|
||||||
// If round minimap, draw player marker
|
// Draw player marker on minimap
|
||||||
if (!data->minimap_shape_round) {
|
if (data->minimap_shape_round) {
|
||||||
|
matrix.setRotationDegrees(core::vector3df(0, 0, 0));
|
||||||
|
} else {
|
||||||
matrix.setRotationDegrees(core::vector3df(0, 0, m_angle));
|
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
|
// Reset transformations
|
||||||
driver->setTransform(video::ETS_VIEW, oldViewMat);
|
driver->setTransform(video::ETS_VIEW, oldViewMat);
|
||||||
driver->setTransform(video::ETS_PROJECTION, oldProjMat);
|
driver->setTransform(video::ETS_PROJECTION, oldProjMat);
|
||||||
|
Loading…
Reference in New Issue
Block a user