From 2d3a8856da7a9385a7ae5a2481daa0d40ac40bd6 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Sun, 28 Aug 2016 13:03:48 +0200 Subject: [PATCH] Draw blips after radar-north and player-marker --- rwengine/src/render/MapRenderer.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rwengine/src/render/MapRenderer.cpp b/rwengine/src/render/MapRenderer.cpp index 4abdad1c..fafdde3b 100644 --- a/rwengine/src/render/MapRenderer.cpp +++ b/rwengine/src/render/MapRenderer.cpp @@ -162,6 +162,17 @@ void MapRenderer::draw(GameWorld* world, const MapInfo& mi) glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 ); glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO); } + + // Draw the player blip + auto player = world->pedestrianPool.find(world->state->playerObject); + if( player ) + { + glm::vec2 plyblip(player->getPosition()); + float hdg = glm::roll(player->getRotation()); + drawBlip(plyblip, view, mi, "radar_centre", mi.rotation - hdg); + } + + drawBlip(mi.worldCenter + glm::vec2(0.f, mi.worldSize), view, mi, "radar_north", 0.f, 24.f); for(auto& blip : world->state->radarBlips) { @@ -177,17 +188,6 @@ void MapRenderer::draw(GameWorld* world, const MapInfo& mi) drawBlip(blippos, view, mi, blip.second.texture); } - - // Draw the player blip - auto player = world->pedestrianPool.find(world->state->playerObject); - if( player ) - { - glm::vec2 plyblip(player->getPosition()); - float hdg = glm::roll(player->getRotation()); - drawBlip(plyblip, view, mi, "radar_centre", mi.rotation - hdg); - } - - drawBlip(mi.worldCenter + glm::vec2(0.f, mi.worldSize), view, mi, "radar_north", 0.f, 24.f); glBindVertexArray( 0 ); glBindTexture(GL_TEXTURE_2D, 0);