mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix taxi flights, mounts, and movement recovery
This commit is contained in:
parent
d910073d7a
commit
6736ec328b
13 changed files with 607 additions and 49 deletions
|
|
@ -75,6 +75,9 @@ public:
|
|||
void setRunSpeedOverride(float speed) { runSpeedOverride_ = speed; }
|
||||
void setMounted(bool m) { mounted_ = m; }
|
||||
void setMountHeightOffset(float offset) { mountHeightOffset_ = offset; }
|
||||
void setExternalFollow(bool enabled) { externalFollow_ = enabled; }
|
||||
void setExternalMoving(bool moving) { externalMoving_ = moving; }
|
||||
void clearMovementInputs();
|
||||
|
||||
// For first-person player hiding
|
||||
void setCharacterRenderer(class CharacterRenderer* cr, uint32_t playerId) {
|
||||
|
|
@ -113,6 +116,7 @@ private:
|
|||
float userTargetDistance = 10.0f; // What the player wants (scroll wheel)
|
||||
float currentDistance = 10.0f; // Smoothed actual distance
|
||||
float collisionDistance = 10.0f; // Max allowed by collision
|
||||
bool externalFollow_ = false;
|
||||
static constexpr float MIN_DISTANCE = 0.5f; // Minimum zoom (first-person threshold)
|
||||
static constexpr float MAX_DISTANCE = 50.0f; // Maximum zoom out
|
||||
static constexpr float ZOOM_SMOOTH_SPEED = 15.0f; // How fast zoom eases
|
||||
|
|
@ -195,6 +199,7 @@ private:
|
|||
float runSpeedOverride_ = 0.0f;
|
||||
bool mounted_ = false;
|
||||
float mountHeightOffset_ = 0.0f;
|
||||
bool externalMoving_ = false;
|
||||
|
||||
// Online mode: trust server position, don't prefer outdoors over WMO floors
|
||||
bool onlineMode = false;
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ public:
|
|||
glm::vec3& getCharacterPosition() { return characterPosition; }
|
||||
uint32_t getCharacterInstanceId() const { return characterInstanceId; }
|
||||
float getCharacterYaw() const { return characterYaw; }
|
||||
void setCharacterYaw(float yawDeg) { characterYaw = yawDeg; }
|
||||
|
||||
// Emote support
|
||||
void playEmote(const std::string& emoteName);
|
||||
|
|
@ -127,6 +128,7 @@ public:
|
|||
|
||||
// Mount rendering
|
||||
void setMounted(uint32_t mountInstId, float heightOffset);
|
||||
void setTaxiFlight(bool onTaxi) { taxiFlight_ = onTaxi; }
|
||||
void clearMount();
|
||||
bool isMounted() const { return mountInstanceId_ != 0; }
|
||||
|
||||
|
|
@ -272,6 +274,7 @@ private:
|
|||
// Mount state
|
||||
uint32_t mountInstanceId_ = 0;
|
||||
float mountHeightOffset_ = 0.0f;
|
||||
bool taxiFlight_ = false;
|
||||
|
||||
bool terrainEnabled = true;
|
||||
bool terrainLoaded = false;
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ public:
|
|||
void setLoadRadius(int radius) { loadRadius = radius; }
|
||||
void setUnloadRadius(int radius) { unloadRadius = radius; }
|
||||
void setStreamingEnabled(bool enabled) { streamingEnabled = enabled; }
|
||||
void setUpdateInterval(float seconds) { updateInterval = seconds; }
|
||||
void setWaterRenderer(WaterRenderer* renderer) { waterRenderer = renderer; }
|
||||
void setM2Renderer(M2Renderer* renderer) { m2Renderer = renderer; }
|
||||
void setWMORenderer(WMORenderer* renderer) { wmoRenderer = renderer; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue