diff --git a/Adventures in Lestoria/Minimap.cpp b/Adventures in Lestoria/Minimap.cpp index 0a4ca3e2..117ee620 100644 --- a/Adventures in Lestoria/Minimap.cpp +++ b/Adventures in Lestoria/Minimap.cpp @@ -175,6 +175,8 @@ void Minimap::Reset(){ UpdateChunk(game->GetCurrentMapName(),chunkPos,InitialLoad::YES); } #pragma endregion + + revealedChunks.clear(); } void Minimap::Update(){ @@ -187,7 +189,9 @@ void Minimap::Update(){ void Minimap::UpdateChunk(const MapName map,const vi2d chunkPos,const InitialLoad initialLoad){ if(game->TestingModeEnabled())return; - loadedChunks[map].insert(std::format("{}_{}",chunkPos.x,chunkPos.y)); + const bool minimapChunkLoadSucceeded{loadedChunks[map].insert(std::format("{}_{}",chunkPos.x,chunkPos.y)).second}; + const bool minimapChunkRevealSucceeded{revealedChunks[map].insert(std::format("{}_{}",chunkPos.x,chunkPos.y)).second}; + if(!minimapChunkLoadSucceeded&&!minimapChunkRevealSucceeded)return; if(game->GetCurrentMapName()!=map)return; //Don't update the minimap when the map name doesn't match the current map. diff --git a/Adventures in Lestoria/Minimap.h b/Adventures in Lestoria/Minimap.h index 5ec1e8ad..71f2f8b3 100644 --- a/Adventures in Lestoria/Minimap.h +++ b/Adventures in Lestoria/Minimap.h @@ -70,7 +70,7 @@ private: Renderable minimap; Renderable cover; Renderable coverOutline; - std::unordered_map>loadedChunks; + std::unordered_map>loadedChunks,revealedChunks; MinimapMode displayMode=MinimapMode::SMALL; bool MinimapVisible(); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index a0dae699..9314662d 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 10024 +#define VERSION_BUILD 10027 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index ba65ad6d..1e8d3250 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ