Skip to content

Commit

Permalink
Only draw detected entities for the current level
Browse files Browse the repository at this point in the history
Otherwise they will show up for each level in the book.
Also fix the offset for detected NPCs in the non-book minimap.

Reimplements a fix from arx-fatalis-fixed r25

See: task #276
  • Loading branch information
dscharrer committed May 6, 2013
1 parent a1bd807 commit f1de10c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/gui/MiniMap.cpp
Expand Up @@ -325,9 +325,9 @@ void MiniMap::showPlayerMiniMap(int showLevel) {
// Draw the player (red arrow)
if(showLevel == ARX_LEVELS_GetRealNum(m_currentLevel)) {
drawPlayer(playerSize, playerPos.x + decalX, playerPos.y + decalY, true);
drawDetectedEntities(showLevel, startX + decalX, startY + decalY, miniMapZoom);
}

drawDetectedEntities(showLevel, startX, startY, miniMapZoom);
}
}

Expand Down Expand Up @@ -362,10 +362,9 @@ void MiniMap::showBookMiniMap(int showLevel) {

if(showLevel == ARX_LEVELS_GetRealNum(m_currentLevel)) {
drawPlayer(6.f, playerPos.x, playerPos.y);
drawDetectedEntities(showLevel, startX, startY, zoom);
}

// tsu
drawDetectedEntities(showLevel, startX, startY, zoom);
}
}

Expand Down Expand Up @@ -400,11 +399,9 @@ void MiniMap::showBookEntireMap(int showLevel) {

if(showLevel == ARX_LEVELS_GetRealNum(m_currentLevel)) {
drawPlayer(3.f, playerPos.x, playerPos.y);
drawDetectedEntities(showLevel, startX, startY, zoom);
}

// tsu
drawDetectedEntities(showLevel, startX, startY, zoom);

TexturedVertex verts[4];
for(int k = 0; k < 4; k++) {
verts[k].color = 0xFFFFFFFF;
Expand Down

0 comments on commit f1de10c

Please sign in to comment.