mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add mount idle fidget animations and ambient sounds
Implements WoW-style mount idle behavior when player is stationary: - Fidget animations: discovered via property search (non-looping, 500-1500ms, stationary, IDs 1-10) - Triggers random fidget every 6-12 seconds when standing still - Ambient idle sounds: snorts/breaths for ground mounts, soft wing sounds for flyers - Triggers random idle sound every 8-15 seconds when stationary - Both systems reset timers on movement to avoid triggering while riding
This commit is contained in:
parent
4b9a2394d5
commit
8d8e780607
4 changed files with 74 additions and 1 deletions
|
|
@ -302,6 +302,27 @@ void MountSoundManager::playLandSound() {
|
|||
}
|
||||
}
|
||||
|
||||
void MountSoundManager::playIdleSound() {
|
||||
if (!mounted_ || moving_) return;
|
||||
|
||||
// Ambient idle sounds (snort, breath, soft neigh)
|
||||
if (currentMountType_ == MountType::GROUND && !horseBreathSounds_.empty()) {
|
||||
static std::mt19937 rng(std::random_device{}());
|
||||
std::uniform_int_distribution<size_t> dist(0, horseBreathSounds_.size() - 1);
|
||||
const auto& sample = horseBreathSounds_[dist(rng)];
|
||||
if (!sample.data.empty()) {
|
||||
AudioEngine::instance().playSound2D(sample.data, 0.3f * volumeScale_, 0.95f);
|
||||
}
|
||||
} else if (currentMountType_ == MountType::FLYING && !wingIdleSounds_.empty()) {
|
||||
static std::mt19937 rng(std::random_device{}());
|
||||
std::uniform_int_distribution<size_t> dist(0, wingIdleSounds_.size() - 1);
|
||||
const auto& sample = wingIdleSounds_[dist(rng)];
|
||||
if (!sample.data.empty()) {
|
||||
AudioEngine::instance().playSound2D(sample.data, 0.25f * volumeScale_, 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MountType MountSoundManager::detectMountType(uint32_t creatureDisplayId) const {
|
||||
// TODO: Load from CreatureDisplayInfo.dbc or CreatureModelData.dbc
|
||||
// For now, use simple heuristics based on common display IDs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue