mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
Add mount system and crash mouse-release handler
Render mount M2 model under player with seated animation, apply creature skin textures, server-driven speed via SMSG_FORCE_RUN_SPEED_CHANGE, and /dismount command. X11 XUngrabPointer on crash/hang to always release mouse.
This commit is contained in:
parent
4e749080ec
commit
6ba143ddc0
13 changed files with 363 additions and 3 deletions
|
|
@ -455,6 +455,13 @@ public:
|
|||
}
|
||||
const std::unordered_map<uint64_t, QuestGiverStatus>& getNpcQuestStatuses() const { return npcQuestStatus_; }
|
||||
|
||||
// Mount state
|
||||
using MountCallback = std::function<void(uint32_t mountDisplayId)>; // 0 = dismount
|
||||
void setMountCallback(MountCallback cb) { mountCallback_ = std::move(cb); }
|
||||
bool isMounted() const { return currentMountDisplayId_ != 0; }
|
||||
float getServerRunSpeed() const { return serverRunSpeed_; }
|
||||
void dismount();
|
||||
|
||||
// Taxi / Flight Paths
|
||||
bool isTaxiWindowOpen() const { return taxiWindowOpen_; }
|
||||
void closeTaxi();
|
||||
|
|
@ -630,6 +637,9 @@ private:
|
|||
// ---- Teleport handler ----
|
||||
void handleTeleportAck(network::Packet& packet);
|
||||
|
||||
// ---- Speed change handler ----
|
||||
void handleForceRunSpeedChange(network::Packet& packet);
|
||||
|
||||
// ---- Taxi handlers ----
|
||||
void handleShowTaxiNodes(network::Packet& packet);
|
||||
void handleActivateTaxiReply(network::Packet& packet);
|
||||
|
|
@ -844,6 +854,8 @@ private:
|
|||
ShowTaxiNodesData currentTaxiData_;
|
||||
uint64_t taxiNpcGuid_ = 0;
|
||||
bool onTaxiFlight_ = false;
|
||||
uint32_t knownTaxiMask_[12] = {}; // Track previously known nodes for discovery alerts
|
||||
bool taxiMaskInitialized_ = false; // First SMSG_SHOWTAXINODES seeds mask without alerts
|
||||
|
||||
// Vendor
|
||||
bool vendorWindowOpen = false;
|
||||
|
|
@ -877,6 +889,9 @@ private:
|
|||
NpcRespawnCallback npcRespawnCallback_;
|
||||
MeleeSwingCallback meleeSwingCallback_;
|
||||
NpcSwingCallback npcSwingCallback_;
|
||||
MountCallback mountCallback_;
|
||||
uint32_t currentMountDisplayId_ = 0;
|
||||
float serverRunSpeed_ = 7.0f;
|
||||
bool playerDead_ = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue