Fix mount sounds with real MPQ paths and family detection

Mount Sound System:
- Use actual creature sounds from MPQ (Horse, Ram, Wolf, Tiger, Dragons)
- Separate sound pools: jump (attack), landing (wound), rear-up (aggro)
- Mount family detection: HORSE, RAM, WOLF, TIGER, RAPTOR, DRAGON
- Family logged on mount for future per-family sound selection

Sound Mappings:
- Flying mounts: Dragon wing flaps + DragonHawk screeches
- Ground mounts: Horse attack (jump), wound (land), aggro (rear-up)
- Ready for family-specific sound selection (TODO)

Mount Lean:
- Procedural lean into turns for ground mounts
- Physics-based: turn rate × 0.15, max ±14°, 6x/sec blend
- Returns to upright when not turning or when flying
- Rider follows mount roll automatically via bone attachment
This commit is contained in:
Kelsi 2026-02-10 19:49:07 -08:00
parent c623fcef51
commit 4b9a2394d5
2 changed files with 105 additions and 28 deletions

View file

@ -17,6 +17,16 @@ enum class MountType {
SWIMMING // Sea turtle, etc.
};
enum class MountFamily {
UNKNOWN,
HORSE,
RAM,
WOLF,
TIGER,
RAPTOR,
DRAGON
};
struct MountSample {
std::string path;
std::vector<uint8_t> data;
@ -51,6 +61,7 @@ public:
private:
MountType detectMountType(uint32_t creatureDisplayId) const;
MountFamily detectMountFamily(uint32_t creatureDisplayId) const;
void updateMountSounds();
void stopAllMountSounds();
void loadMountSounds();
@ -61,6 +72,7 @@ private:
bool moving_ = false;
bool flying_ = false;
MountType currentMountType_ = MountType::NONE;
MountFamily currentMountFamily_ = MountFamily::UNKNOWN;
uint32_t currentDisplayId_ = 0;
float volumeScale_ = 1.0f;
@ -69,6 +81,8 @@ private:
std::vector<MountSample> wingIdleSounds_;
std::vector<MountSample> horseBreathSounds_;
std::vector<MountSample> horseMoveSounds_;
std::vector<MountSample> horseJumpSounds_; // Jump effort sounds
std::vector<MountSample> horseLandSounds_; // Landing thud sounds
// Sound state tracking
bool playingMovementSound_ = false;