mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-27 09:03:51 +00:00
Fix online item GUID resolution, async terrain loading, and inventory enrichment
Enrich online inventory from local DB when server data is incomplete, add resolveOnlineItemGuid fallback for sell/equip/use, use async enqueueTile for initial terrain load, improve walk/run animation fallbacks, clear target on loot close, and broaden equipability detection to include armor/subclass.
This commit is contained in:
parent
db4a40a4e6
commit
e38c0213e4
6 changed files with 119 additions and 8 deletions
|
|
@ -661,7 +661,7 @@ void Renderer::updateCharacterAnimation() {
|
|||
} else if (anyStrafeRight) {
|
||||
animId = pickFirstAvailable({ANIM_STRAFE_WALK_RIGHT, ANIM_STRAFE_RUN_RIGHT}, ANIM_WALK);
|
||||
} else {
|
||||
animId = ANIM_WALK;
|
||||
animId = pickFirstAvailable({ANIM_WALK, ANIM_RUN}, ANIM_STAND);
|
||||
}
|
||||
loop = true;
|
||||
break;
|
||||
|
|
@ -673,7 +673,7 @@ void Renderer::updateCharacterAnimation() {
|
|||
} else if (anyStrafeRight) {
|
||||
animId = pickFirstAvailable({ANIM_STRAFE_RUN_RIGHT}, ANIM_RUN);
|
||||
} else {
|
||||
animId = ANIM_RUN;
|
||||
animId = pickFirstAvailable({ANIM_RUN, ANIM_WALK}, ANIM_STAND);
|
||||
}
|
||||
loop = true;
|
||||
break;
|
||||
|
|
@ -1622,11 +1622,11 @@ bool Renderer::loadTestTerrain(pipeline::AssetManager* assetManager, const std::
|
|||
}
|
||||
}
|
||||
|
||||
LOG_INFO("Loading initial tile [", tileX, ",", tileY, "] via terrain manager");
|
||||
LOG_INFO("Enqueuing initial tile [", tileX, ",", tileY, "] via terrain manager");
|
||||
|
||||
// Load the initial tile through TerrainManager (properly tracked for streaming)
|
||||
if (!terrainManager->loadTile(tileX, tileY)) {
|
||||
LOG_ERROR("Failed to load initial tile [", tileX, ",", tileY, "]");
|
||||
// Enqueue the initial tile for async loading (avoids long sync stalls)
|
||||
if (!terrainManager->enqueueTile(tileX, tileY)) {
|
||||
LOG_ERROR("Failed to enqueue initial tile [", tileX, ",", tileY, "]");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,6 +194,27 @@ bool TerrainManager::loadTile(int x, int y) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TerrainManager::enqueueTile(int x, int y) {
|
||||
TileCoord coord = {x, y};
|
||||
if (loadedTiles.find(coord) != loadedTiles.end()) {
|
||||
return true;
|
||||
}
|
||||
if (pendingTiles.find(coord) != pendingTiles.end()) {
|
||||
return true;
|
||||
}
|
||||
if (failedTiles.find(coord) != failedTiles.end()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(queueMutex);
|
||||
loadQueue.push(coord);
|
||||
pendingTiles[coord] = true;
|
||||
}
|
||||
queueCV.notify_all();
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<PendingTile> TerrainManager::prepareTile(int x, int y) {
|
||||
TileCoord coord = {x, y};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue