mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Fix terrain streaming loop and auto-select single realm/character
Use getRemainingTileCount (pending + readyQueue) and processAllReadyTiles to prevent loading screen from exiting before tiles are finalized. Auto-select realm and character when only one is available.
This commit is contained in:
parent
81d712121e
commit
aa11ffda72
5 changed files with 68 additions and 15 deletions
|
|
@ -661,6 +661,23 @@ void TerrainManager::processReadyTiles() {
|
|||
}
|
||||
}
|
||||
|
||||
void TerrainManager::processAllReadyTiles() {
|
||||
while (true) {
|
||||
std::unique_ptr<PendingTile> pending;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(queueMutex);
|
||||
if (readyQueue.empty()) break;
|
||||
pending = std::move(readyQueue.front());
|
||||
readyQueue.pop();
|
||||
}
|
||||
if (pending) {
|
||||
TileCoord coord = pending->coord;
|
||||
finalizeTile(std::move(pending));
|
||||
pendingTiles.erase(coord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TerrainManager::unloadTile(int x, int y) {
|
||||
TileCoord coord = {x, y};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue