mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Replace blacksmith weapon sounds with proper BlackSmith ambience loop
Replaces the pitch-shifted weapon hit sound hack with the official Sound\Ambience\WMOAmbience\BlackSmith.wav ambience loop. This provides authentic blacksmith atmosphere with natural hammer strikes and anvil sounds. Changes: - Use proper blacksmith ambience file instead of modified weapon sounds - Remove pitch shifting (1.6x) - use natural sound at 1.0x pitch - Adjust volume to 0.6 (from 0.25) for ambient loop - Play every 15 seconds (from 2.5s) for natural atmosphere - Single loop file replaces 3 random weapon hit sounds
This commit is contained in:
parent
28d009f7db
commit
bbfab23566
1 changed files with 9 additions and 22 deletions
|
|
@ -73,12 +73,9 @@ bool AmbientSoundManager::initialize(pipeline::AssetManager* assets) {
|
||||||
tavernSounds_.resize(1);
|
tavernSounds_.resize(1);
|
||||||
bool tavernLoaded = loadSound("Sound\\Ambience\\WMOAmbience\\Tavern.wav", tavernSounds_[0], assets);
|
bool tavernLoaded = loadSound("Sound\\Ambience\\WMOAmbience\\Tavern.wav", tavernSounds_[0], assets);
|
||||||
|
|
||||||
// Load multiple hammer sounds for variety (short metal hit sounds)
|
// Load blacksmith ambience loop
|
||||||
blacksmithSounds_.resize(3);
|
blacksmithSounds_.resize(1);
|
||||||
bool bs1 = loadSound("Sound\\Item\\Weapons\\Mace1HMetal\\1hMaceMetalHitWoodCrit.wav", blacksmithSounds_[0], assets);
|
bool blacksmithLoaded = loadSound("Sound\\Ambience\\WMOAmbience\\BlackSmith.wav", blacksmithSounds_[0], assets);
|
||||||
bool bs2 = loadSound("Sound\\Item\\Weapons\\Sword2H\\m2hSwordHitMetalShield1c.wav", blacksmithSounds_[1], assets);
|
|
||||||
bool bs3 = loadSound("Sound\\Item\\Weapons\\Axe2H\\m2hAxeHitChain1c.wav", blacksmithSounds_[2], assets);
|
|
||||||
bool blacksmithLoaded = (bs1 || bs2 || bs3);
|
|
||||||
|
|
||||||
LOG_INFO("AmbientSoundManager: Wind loaded: ", windLoaded ? "YES" : "NO",
|
LOG_INFO("AmbientSoundManager: Wind loaded: ", windLoaded ? "YES" : "NO",
|
||||||
", Tavern loaded: ", tavernLoaded ? "YES" : "NO",
|
", Tavern loaded: ", tavernLoaded ? "YES" : "NO",
|
||||||
|
|
@ -290,23 +287,13 @@ void AmbientSoundManager::updateBlacksmithAmbience(float deltaTime) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasSound) {
|
if (hasSound && blacksmithSounds_[0].loaded) {
|
||||||
blacksmithLoopTime_ += deltaTime;
|
blacksmithLoopTime_ += deltaTime;
|
||||||
// Play every 2.5 seconds - rapid hammer strikes like real blacksmith
|
// Play blacksmith ambience loop every 15 seconds
|
||||||
if (blacksmithLoopTime_ >= 2.5f) {
|
if (blacksmithLoopTime_ >= 15.0f) {
|
||||||
// Pick random hammer sound
|
float volume = 0.6f * volumeScale_; // Ambient loop volume
|
||||||
int index = 0;
|
AudioEngine::instance().playSound2D(blacksmithSounds_[0].data, volume, 1.0f);
|
||||||
for (int i = 0; i < static_cast<int>(blacksmithSounds_.size()); i++) {
|
LOG_INFO("Playing blacksmith ambience loop");
|
||||||
if (blacksmithSounds_[i].loaded) {
|
|
||||||
index = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
float volume = 0.25f * volumeScale_; // Reduced 30% from 0.35
|
|
||||||
float pitch = 1.6f; // Higher pitch for metallic clink
|
|
||||||
AudioEngine::instance().playSound2D(blacksmithSounds_[index].data, volume, pitch);
|
|
||||||
LOG_INFO("Playing blacksmith ambience (hammer strike)");
|
|
||||||
blacksmithLoopTime_ = 0.0f;
|
blacksmithLoopTime_ = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue