|
|
@ -175,6 +175,8 @@ void Minimap::Reset(){ |
|
|
|
UpdateChunk(game->GetCurrentMapName(),chunkPos,InitialLoad::YES); |
|
|
|
UpdateChunk(game->GetCurrentMapName(),chunkPos,InitialLoad::YES); |
|
|
|
} |
|
|
|
} |
|
|
|
#pragma endregion |
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
revealedChunks.clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Minimap::Update(){ |
|
|
|
void Minimap::Update(){ |
|
|
@ -187,7 +189,9 @@ void Minimap::Update(){ |
|
|
|
|
|
|
|
|
|
|
|
void Minimap::UpdateChunk(const MapName map,const vi2d chunkPos,const InitialLoad initialLoad){ |
|
|
|
void Minimap::UpdateChunk(const MapName map,const vi2d chunkPos,const InitialLoad initialLoad){ |
|
|
|
if(game->TestingModeEnabled())return; |
|
|
|
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.
|
|
|
|
if(game->GetCurrentMapName()!=map)return; //Don't update the minimap when the map name doesn't match the current map.
|
|
|
|
|
|
|
|
|
|
|
|