mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
Add dedicated snort and whinny idle sounds with longer intervals
Created specific idle sound pool using only horse snorts and whinnies. Re-enabled idle sounds with much longer interval (20-40 seconds). Changes: - Added horseIdleSounds_ pool: mHorseStand3A (snort) + mHorseAggroA (whinny) - Updated playIdleSound() to use dedicated pool instead of mixed breath sounds - Increased idle sound interval from 8-15s to 20-40s (less frequent) - Removed flying mount idle sounds (too aggressive) - Increased volume slightly (0.35x) for better audibility
This commit is contained in:
parent
8106347a82
commit
3c58492c8f
22 changed files with 36 additions and 25 deletions
|
|
@ -84,6 +84,7 @@ private:
|
||||||
std::vector<MountSample> horseMoveSounds_;
|
std::vector<MountSample> horseMoveSounds_;
|
||||||
std::vector<MountSample> horseJumpSounds_; // Jump effort sounds
|
std::vector<MountSample> horseJumpSounds_; // Jump effort sounds
|
||||||
std::vector<MountSample> horseLandSounds_; // Landing thud sounds
|
std::vector<MountSample> horseLandSounds_; // Landing thud sounds
|
||||||
|
std::vector<MountSample> horseIdleSounds_; // Snorts and whinnies for idle
|
||||||
|
|
||||||
// Sound state tracking
|
// Sound state tracking
|
||||||
bool playingMovementSound_ = false;
|
bool playingMovementSound_ = false;
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,19 @@ void MountSoundManager::loadMountSounds() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ground mount idle ambient (snorts and whinnies only)
|
||||||
|
std::vector<std::string> horseIdlePaths = {
|
||||||
|
"Sound\\Creature\\Horse\\mHorseStand3A.wav", // Snort
|
||||||
|
"Sound\\Creature\\Horse\\mHorseAggroA.wav", // Whinny
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const auto& path : horseIdlePaths) {
|
||||||
|
MountSample sample;
|
||||||
|
if (loadSound(path, sample)) {
|
||||||
|
horseIdleSounds_.push_back(std::move(sample));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!wingFlapSounds_.empty()) {
|
if (!wingFlapSounds_.empty()) {
|
||||||
LOG_INFO("Loaded ", wingFlapSounds_.size(), " wing flap sounds");
|
LOG_INFO("Loaded ", wingFlapSounds_.size(), " wing flap sounds");
|
||||||
}
|
}
|
||||||
|
|
@ -146,6 +159,9 @@ void MountSoundManager::loadMountSounds() {
|
||||||
if (!horseLandSounds_.empty()) {
|
if (!horseLandSounds_.empty()) {
|
||||||
LOG_INFO("Loaded ", horseLandSounds_.size(), " horse land sounds");
|
LOG_INFO("Loaded ", horseLandSounds_.size(), " horse land sounds");
|
||||||
}
|
}
|
||||||
|
if (!horseIdleSounds_.empty()) {
|
||||||
|
LOG_INFO("Loaded ", horseIdleSounds_.size(), " horse idle sounds (snorts/whinnies)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MountSoundManager::loadSound(const std::string& path, MountSample& sample) {
|
bool MountSoundManager::loadSound(const std::string& path, MountSample& sample) {
|
||||||
|
|
@ -305,22 +321,16 @@ void MountSoundManager::playLandSound() {
|
||||||
void MountSoundManager::playIdleSound() {
|
void MountSoundManager::playIdleSound() {
|
||||||
if (!mounted_ || moving_) return;
|
if (!mounted_ || moving_) return;
|
||||||
|
|
||||||
// Ambient idle sounds (snort, breath, soft neigh)
|
// Ambient idle sounds (snorts and whinnies only for ground mounts)
|
||||||
if (currentMountType_ == MountType::GROUND && !horseBreathSounds_.empty()) {
|
if (currentMountType_ == MountType::GROUND && !horseIdleSounds_.empty()) {
|
||||||
static std::mt19937 rng(std::random_device{}());
|
static std::mt19937 rng(std::random_device{}());
|
||||||
std::uniform_int_distribution<size_t> dist(0, horseBreathSounds_.size() - 1);
|
std::uniform_int_distribution<size_t> dist(0, horseIdleSounds_.size() - 1);
|
||||||
const auto& sample = horseBreathSounds_[dist(rng)];
|
const auto& sample = horseIdleSounds_[dist(rng)];
|
||||||
if (!sample.data.empty()) {
|
if (!sample.data.empty()) {
|
||||||
AudioEngine::instance().playSound2D(sample.data, 0.3f * volumeScale_, 0.95f);
|
AudioEngine::instance().playSound2D(sample.data, 0.35f * 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// No idle sounds for flying mounts (wing sounds were too aggressive)
|
||||||
}
|
}
|
||||||
|
|
||||||
MountType MountSoundManager::detectMountType(uint32_t creatureDisplayId) const {
|
MountType MountSoundManager::detectMountType(uint32_t creatureDisplayId) const {
|
||||||
|
|
|
||||||
|
|
@ -1102,19 +1102,19 @@ void Renderer::updateCharacterAnimation() {
|
||||||
mountActiveFidget_ = 0; // Cancel any active fidget
|
mountActiveFidget_ = 0; // Cancel any active fidget
|
||||||
}
|
}
|
||||||
|
|
||||||
// Idle ambient sounds: DISABLED for now (too frequent/annoying)
|
// Idle ambient sounds: snorts and whinnies only, less frequent
|
||||||
// if (!moving && mountSoundManager) {
|
if (!moving && mountSoundManager) {
|
||||||
// mountIdleSoundTimer_ += lastDeltaTime_;
|
mountIdleSoundTimer_ += lastDeltaTime_;
|
||||||
// static float nextIdleSoundTime = 8.0f + (rand() % 8); // 8-15 seconds
|
static float nextIdleSoundTime = 20.0f + (rand() % 21); // 20-40 seconds
|
||||||
//
|
|
||||||
// if (mountIdleSoundTimer_ >= nextIdleSoundTime) {
|
if (mountIdleSoundTimer_ >= nextIdleSoundTime) {
|
||||||
// mountSoundManager->playIdleSound();
|
mountSoundManager->playIdleSound();
|
||||||
// mountIdleSoundTimer_ = 0.0f;
|
mountIdleSoundTimer_ = 0.0f;
|
||||||
// nextIdleSoundTime = 8.0f + (rand() % 8); // Randomize next sound time
|
nextIdleSoundTime = 20.0f + (rand() % 21); // Randomize next sound time
|
||||||
// }
|
}
|
||||||
// } else if (moving) {
|
} else if (moving) {
|
||||||
// mountIdleSoundTimer_ = 0.0f; // Reset timer when moving
|
mountIdleSoundTimer_ = 0.0f; // Reset timer when moving
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Only update animation if it changed and we're not in an action sequence or playing a fidget
|
// Only update animation if it changed and we're not in an action sequence or playing a fidget
|
||||||
if (mountAction_ == MountAction::None && mountActiveFidget_ == 0 && (!haveMountState || curMountAnim != mountAnimId)) {
|
if (mountAction_ == MountAction::None && mountActiveFidget_ == 0 && (!haveMountState || curMountAnim != mountAnimId)) {
|
||||||
|
|
|
||||||
BIN
wowee_1746
Executable file
BIN
wowee_1746
Executable file
Binary file not shown.
BIN
wowee_1748
Executable file
BIN
wowee_1748
Executable file
Binary file not shown.
BIN
wowee_1752
Executable file
BIN
wowee_1752
Executable file
Binary file not shown.
BIN
wowee_1753
Executable file
BIN
wowee_1753
Executable file
Binary file not shown.
BIN
wowee_1804
Executable file
BIN
wowee_1804
Executable file
Binary file not shown.
BIN
wowee_1810
Executable file
BIN
wowee_1810
Executable file
Binary file not shown.
BIN
wowee_1814
Executable file
BIN
wowee_1814
Executable file
Binary file not shown.
BIN
wowee_1816
Executable file
BIN
wowee_1816
Executable file
Binary file not shown.
BIN
wowee_1819
Executable file
BIN
wowee_1819
Executable file
Binary file not shown.
BIN
wowee_1821
Executable file
BIN
wowee_1821
Executable file
Binary file not shown.
BIN
wowee_1823
Executable file
BIN
wowee_1823
Executable file
Binary file not shown.
BIN
wowee_1824
Executable file
BIN
wowee_1824
Executable file
Binary file not shown.
BIN
wowee_1825
Executable file
BIN
wowee_1825
Executable file
Binary file not shown.
BIN
wowee_1828
Executable file
BIN
wowee_1828
Executable file
Binary file not shown.
BIN
wowee_1834
Executable file
BIN
wowee_1834
Executable file
Binary file not shown.
BIN
wowee_1836
Executable file
BIN
wowee_1836
Executable file
Binary file not shown.
BIN
wowee_1840
Executable file
BIN
wowee_1840
Executable file
Binary file not shown.
BIN
wowee_1842
Executable file
BIN
wowee_1842
Executable file
Binary file not shown.
BIN
wowee_1844
Executable file
BIN
wowee_1844
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue