mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix taxi state sync and transport authority; reduce runtime log overhead; restore first-person self-hide
This commit is contained in:
parent
40b50454ce
commit
5171f9cad4
29 changed files with 529 additions and 360 deletions
|
|
@ -65,7 +65,7 @@ private:
|
|||
struct ActiveSound {
|
||||
ma_sound* sound;
|
||||
void* buffer; // ma_audio_buffer* - Keep audio buffer alive
|
||||
std::vector<uint8_t> pcmData; // Keep PCM data alive
|
||||
std::shared_ptr<const std::vector<uint8_t>> pcmDataRef; // Keep decoded PCM alive
|
||||
};
|
||||
std::vector<ActiveSound> activeSounds_;
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,6 @@ private:
|
|||
bool npcsSpawned = false;
|
||||
bool spawnSnapToGround = true;
|
||||
float lastFrameTime = 0.0f;
|
||||
float movementHeartbeatTimer = 0.0f;
|
||||
|
||||
// Player character info (for model spawning)
|
||||
game::Race playerRace_ = game::Race::HUMAN;
|
||||
|
|
|
|||
|
|
@ -1103,6 +1103,7 @@ private:
|
|||
std::unordered_map<uint32_t, uint32_t> taxiCostMap_; // destNodeId -> total cost in copper
|
||||
void buildTaxiCostMap();
|
||||
void applyTaxiMountForCurrentNode();
|
||||
void sanitizeMovementForTaxi();
|
||||
void startClientTaxiPath(const std::vector<uint32_t>& pathNodes);
|
||||
void updateClientTaxi(float deltaTime);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <unordered_set>
|
||||
#include <mutex>
|
||||
|
||||
// Forward declare StormLib handle
|
||||
typedef void* HANDLE;
|
||||
|
|
@ -103,6 +105,11 @@ private:
|
|||
* @param locale Locale string (e.g., "enUS")
|
||||
*/
|
||||
bool loadLocaleArchives(const std::string& locale);
|
||||
|
||||
void logMissingFileOnce(const std::string& filename) const;
|
||||
|
||||
mutable std::mutex missingFileMutex_;
|
||||
mutable std::unordered_set<std::string> missingFileWarnings_;
|
||||
};
|
||||
|
||||
} // namespace pipeline
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public:
|
|||
float getPitch() const { return pitch; }
|
||||
float getFacingYaw() const { return facingYaw; }
|
||||
bool isThirdPerson() const { return thirdPerson; }
|
||||
bool isFirstPersonView() const { return thirdPerson && (userTargetDistance <= MIN_DISTANCE + 0.15f); }
|
||||
bool isGrounded() const { return grounded; }
|
||||
bool isJumping() const { return !grounded && verticalVelocity > 0.0f; }
|
||||
bool isFalling() const { return !grounded && verticalVelocity <= 0.0f; }
|
||||
|
|
|
|||
|
|
@ -264,6 +264,10 @@ public:
|
|||
* @param instanceId Instance ID returned by createInstance()
|
||||
*/
|
||||
void removeInstance(uint32_t instanceId);
|
||||
/**
|
||||
* Remove multiple instances with one spatial-index rebuild.
|
||||
*/
|
||||
void removeInstances(const std::vector<uint32_t>& instanceIds);
|
||||
|
||||
/**
|
||||
* Clear all models and instances
|
||||
|
|
|
|||
|
|
@ -243,6 +243,7 @@ private:
|
|||
std::string currentZoneName;
|
||||
bool inTavern_ = false;
|
||||
bool inBlacksmith_ = false;
|
||||
float musicSwitchCooldown_ = 0.0f;
|
||||
|
||||
// Third-person character state
|
||||
glm::vec3 characterPosition = glm::vec3(0.0f);
|
||||
|
|
|
|||
|
|
@ -319,10 +319,13 @@ private:
|
|||
std::shared_ptr<PendingTile> getCachedTile(const TileCoord& coord);
|
||||
void putCachedTile(const std::shared_ptr<PendingTile>& tile);
|
||||
size_t estimatePendingTileBytes(const PendingTile& tile) const;
|
||||
void logMissingAdtOnce(const std::string& adtPath);
|
||||
std::atomic<bool> workerRunning{false};
|
||||
|
||||
// Track tiles currently queued or being processed to avoid duplicates
|
||||
std::unordered_map<TileCoord, bool, TileCoord::Hash> pendingTiles;
|
||||
std::unordered_set<std::string> missingAdtWarnings_;
|
||||
std::mutex missingAdtWarningsMutex_;
|
||||
|
||||
// Dedup set for doodad placements across tile boundaries
|
||||
std::unordered_set<uint32_t> placedDoodadIds;
|
||||
|
|
|
|||
|
|
@ -207,6 +207,8 @@ private:
|
|||
|
||||
// Default white texture (fallback)
|
||||
GLuint whiteTexture = 0;
|
||||
// Opaque alpha fallback for missing/invalid layer alpha maps
|
||||
GLuint opaqueAlphaTexture = 0;
|
||||
|
||||
// Shadow mapping (receiving)
|
||||
GLuint shadowDepthTex = 0;
|
||||
|
|
|
|||
|
|
@ -121,6 +121,10 @@ public:
|
|||
* @param instanceId Instance to remove
|
||||
*/
|
||||
void removeInstance(uint32_t instanceId);
|
||||
/**
|
||||
* Remove multiple WMO instances with a single spatial-index rebuild.
|
||||
*/
|
||||
void removeInstances(const std::vector<uint32_t>& instanceIds);
|
||||
|
||||
/**
|
||||
* Remove all instances
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue