summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-08-18 16:43:31 +0100
committerparamat <mat.gregory@virginmedia.com>2017-08-20 23:58:15 +0100
commit7657fe7a505425e82d9cab7ae5638f7927138fb0 (patch)
treefed13b884e8fff6b8dd43f86399400539c530115 /src/game.cpp
parenta3441638c67c9a9f626d7542a53fef6340d42751 (diff)
downloadminetest-7657fe7a505425e82d9cab7ae5638f7927138fb0.tar.gz
minetest-7657fe7a505425e82d9cab7ae5638f7927138fb0.tar.bz2
minetest-7657fe7a505425e82d9cab7ae5638f7927138fb0.zip
Minimap: Add new HUD flag for minimap radar mode
Flag default is true to not change default behaviour. The existing minimap HUD flag remains the master control for minimap.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index fad902d03..0f8227749 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2818,6 +2818,9 @@ void Game::toggleMinimap(bool shift_pressed)
if (hud_flags & HUD_FLAG_MINIMAP_VISIBLE) {
mode = mapper->getMinimapMode();
mode = (MinimapMode)((int)mode + 1);
+ // If radar is disabled and in, or switching to, radar mode
+ if (!(hud_flags & HUD_FLAG_MINIMAP_RADAR_VISIBLE) && mode > 3)
+ mode = MINIMAP_MODE_OFF;
}
flags.show_minimap = true;