mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix taxi startup/attachment and reduce taxi streaming hitches
This commit is contained in:
parent
f752a4f517
commit
38cef8d9c6
11 changed files with 396 additions and 190 deletions
|
|
@ -622,6 +622,7 @@ public:
|
|||
void closeTaxi();
|
||||
void activateTaxi(uint32_t destNodeId);
|
||||
bool isOnTaxiFlight() const { return onTaxiFlight_; }
|
||||
bool isTaxiMountActive() const { return taxiMountActive_; }
|
||||
const ShowTaxiNodesData& getTaxiData() const { return currentTaxiData_; }
|
||||
uint32_t getTaxiCurrentNode() const { return currentTaxiData_.nearestNode; }
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ private:
|
|||
|
||||
MPQManager mpqManager;
|
||||
mutable std::mutex readMutex;
|
||||
mutable std::mutex cacheMutex;
|
||||
std::map<std::string, std::shared_ptr<DBCFile>> dbcCache;
|
||||
|
||||
// Decompressed file cache (LRU, dynamic budget based on system RAM)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#include <list>
|
||||
#include <vector>
|
||||
#include <condition_variable>
|
||||
#include <deque>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
namespace wowee {
|
||||
|
|
@ -187,6 +188,7 @@ public:
|
|||
void setUnloadRadius(int radius) { unloadRadius = radius; }
|
||||
void setStreamingEnabled(bool enabled) { streamingEnabled = enabled; }
|
||||
void setUpdateInterval(float seconds) { updateInterval = seconds; }
|
||||
void setTaxiStreamingMode(bool enabled) { taxiStreamingMode_ = enabled; }
|
||||
void setWaterRenderer(WaterRenderer* renderer) { waterRenderer = renderer; }
|
||||
void setM2Renderer(M2Renderer* renderer) { m2Renderer = renderer; }
|
||||
void setWMORenderer(WMORenderer* renderer) { wmoRenderer = renderer; }
|
||||
|
|
@ -286,6 +288,7 @@ private:
|
|||
int unloadRadius = 7; // Unload tiles beyond this radius
|
||||
float updateInterval = 0.033f; // Check streaming every 33ms (~30 fps)
|
||||
float timeSinceLastUpdate = 0.0f;
|
||||
bool taxiStreamingMode_ = false;
|
||||
|
||||
// Tile size constants (WoW ADT specifications)
|
||||
// A tile (ADT) = 16x16 chunks = 533.33 units across
|
||||
|
|
@ -298,7 +301,7 @@ private:
|
|||
int workerCount = 0;
|
||||
std::mutex queueMutex;
|
||||
std::condition_variable queueCV;
|
||||
std::queue<TileCoord> loadQueue;
|
||||
std::deque<TileCoord> loadQueue;
|
||||
std::queue<std::shared_ptr<PendingTile>> readyQueue;
|
||||
|
||||
// In-RAM tile cache (LRU) to avoid re-reading from disk
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue