mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Use zone-specific floor cache files
Save/load floor cache per map (e.g., cache/wmo_floor_Azeroth.bin) instead of a single global file. Saves current zone's cache before teleporting, loads target zone's cache after terrain streaming completes.
This commit is contained in:
parent
1530900bc7
commit
76c4268ed8
5 changed files with 60 additions and 21 deletions
|
|
@ -222,9 +222,11 @@ public:
|
|||
double getQueryTimeMs() const { return queryTimeMs; }
|
||||
uint32_t getQueryCallCount() const { return queryCallCount; }
|
||||
|
||||
// Floor cache persistence
|
||||
bool saveFloorCache(const std::string& filepath) const;
|
||||
bool loadFloorCache(const std::string& filepath);
|
||||
// Floor cache persistence (zone-specific files)
|
||||
void setMapName(const std::string& name) { mapName_ = name; }
|
||||
const std::string& getMapName() const { return mapName_; }
|
||||
bool saveFloorCache() const; // Saves to cache/wmo_floor_<mapName>.bin
|
||||
bool loadFloorCache(); // Loads from cache/wmo_floor_<mapName>.bin
|
||||
size_t getFloorCacheSize() const { return precomputedFloorGrid.size(); }
|
||||
|
||||
// Pre-compute floor cache for all loaded WMO instances
|
||||
|
|
@ -428,6 +430,9 @@ private:
|
|||
// Asset manager for loading textures
|
||||
pipeline::AssetManager* assetManager = nullptr;
|
||||
|
||||
// Current map name for zone-specific floor cache
|
||||
std::string mapName_;
|
||||
|
||||
// Texture cache (path -> texture ID)
|
||||
std::unordered_map<std::string, GLuint> textureCache;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue