refactor: extract guidToUnitId/getQuestTitle helpers and misc cleanup

- Extract guidToUnitId(), getQuestTitle(), findQuestLogEntry() helpers
  to replace 14 duplicated GUID-to-unitId patterns and 7 quest log
  search patterns in game_handler.cpp
- Remove duplicate #include in renderer.cpp
- Remove commented-out model cleanup code in terrain_manager.cpp
- Replace C-style casts with static_cast in auth and transport code
This commit is contained in:
Kelsi 2026-03-25 11:25:44 -07:00
parent 087e42d7a1
commit 98b9e502c5
7 changed files with 57 additions and 124 deletions

View file

@ -33,7 +33,6 @@
#include "pipeline/asset_manager.hpp"
#include "pipeline/dbc_loader.hpp"
#include "pipeline/dbc_layout.hpp"
#include "pipeline/m2_loader.hpp"
#include "pipeline/wmo_loader.hpp"
#include "pipeline/adt_loader.hpp"
#include "pipeline/terrain_mesh.hpp"

View file

@ -2325,17 +2325,6 @@ void TerrainManager::streamTiles() {
}
if (!tilesToUnload.empty()) {
// Don't clean up models during streaming - keep them in VRAM for performance
// Modern GPUs have 8-16GB VRAM, models are only ~hundreds of MB
// Cleanup can be done manually when memory pressure is detected
// NOTE: Disabled permanent model cleanup to leverage modern VRAM capacity
// if (m2Renderer) {
// m2Renderer->cleanupUnusedModels();
// }
// if (wmoRenderer) {
// wmoRenderer->cleanupUnusedModels();
// }
LOG_INFO("Unloaded ", tilesToUnload.size(), " distant tiles, ",
loadedTiles.size(), " remain (models kept in VRAM)");
}