From 3b49bdc6c73946b4132fe7bc119208e559995f67 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 17 Nov 2023 12:39:24 -0500 Subject: Fixed hunt-only areas not showing up for hunts --- src/game_data.cpp | 1 + src/game_data.h | 1 + src/tracker_panel.cpp | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game_data.cpp b/src/game_data.cpp index 2022097..31e23ec 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp @@ -550,6 +550,7 @@ struct GameData { for (MapArea &map_area : map_areas_) { for (const Location &location : map_area.locations) { map_area.classification |= location.classification; + map_area.hunt |= location.hunt; } } diff --git a/src/game_data.h b/src/game_data.h index 721ecc6..8a38264 100644 --- a/src/game_data.h +++ b/src/game_data.h @@ -98,6 +98,7 @@ struct MapArea { int map_x; int map_y; int classification = 0; + bool hunt = false; }; const std::vector& GD_GetMapAreas(); diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index f6fed25..5e035af 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp @@ -104,7 +104,8 @@ void TrackerPanel::Redraw() { for (AreaIndicator &area : areas_) { const MapArea &map_area = GD_GetMapArea(area.area_id); - if (!AP_IsLocationVisible(map_area.classification)) { + if (!AP_IsLocationVisible(map_area.classification) && + !(map_area.hunt && GetTrackerConfig().show_hunt_panels)) { area.active = false; continue; } else { -- cgit 1.4.1