1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-12-09 00:45:30 +01:00

Fix incorrect minimap radar access (#16709)

Keeping as much functionality as possible

Co-authored-by: Tyler Blair <tylerpblair@hotmail.com>
This commit is contained in:
OffTheBeatenByte
2025-12-06 02:20:48 -06:00
committed by GitHub
parent d4c3529af7
commit cc16a55d78

View File

@@ -1754,13 +1754,11 @@ void Game::toggleMinimap(bool shift_pressed)
// -->
u32 hud_flags = client->getEnv().getLocalPlayer()->hud_flags;
if (hud_flags & HUD_FLAG_MINIMAP_VISIBLE) {
// If radar is disabled, try to find a non radar mode or fall back to 0
if (!(hud_flags & HUD_FLAG_MINIMAP_RADAR_VISIBLE))
while (mapper->getModeIndex() &&
mapper->getModeDef().type == MINIMAP_TYPE_RADAR)
mapper->nextMode();
}
if (!(hud_flags & HUD_FLAG_MINIMAP_RADAR_VISIBLE))
while (mapper->getModeIndex() &&
mapper->getModeDef().type == MINIMAP_TYPE_RADAR)
mapper->nextMode();
// <--
// End of 'not so satifying code'
if (hud && hud->hasElementOfType(HUD_ELEM_MINIMAP))