mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Add comprehensive weather, water, and zone ambient audio systems
Implemented three new ambient audio systems with automatic day/night transitions: Weather ambience: - Rain sounds (light/medium/heavy intensity based on weather system) - Snow sounds (light/medium/heavy intensity) - Automatically syncs with visual weather system in renderer - Different loop intervals based on intensity (18-30s) - Disabled indoors Water ambience: - Underwater swimming sounds (18s loop) - Ocean surface sounds - State tracking for entering/exiting water Zone ambience: - Forest (normal and snow variants) - Beach sounds - Grasslands - Jungle - Marsh/swamp - Desert (canyon and plains variants) - All zones have separate day/night sound files - 30s loop interval for subtle background atmosphere - Disabled indoors Technical details: - Added WeatherType enum (NONE, RAIN/SNOW LIGHT/MEDIUM/HEAVY) - Added ZoneType enum (NONE, FOREST_NORMAL, FOREST_SNOW, BEACH, GRASSLANDS, JUNGLE, MARSH, DESERT_CANYON, DESERT_PLAINS) - Loads 26 new sound files from Sound\Ambience\Weather and Sound\Ambience\ZoneAmbience - Weather intensity thresholds: <0.33 = light, 0.33-0.66 = medium, >0.66 = heavy - Renderer automatically converts Weather::Type + intensity to AmbientSoundManager::WeatherType - All ambience respects volumeScale_ and indoor state - State change logging for debugging transitions
This commit is contained in:
parent
bbfab23566
commit
d6f0c2ec46
3 changed files with 321 additions and 0 deletions
|
|
@ -1425,6 +1425,34 @@ void Renderer::update(float deltaTime) {
|
|||
// Check if inside blacksmith (96048 = Goldshire blacksmith)
|
||||
bool isBlacksmith = (wmoId == 96048);
|
||||
|
||||
// Sync weather audio with visual weather system
|
||||
if (weather) {
|
||||
auto weatherType = weather->getWeatherType();
|
||||
float intensity = weather->getIntensity();
|
||||
|
||||
audio::AmbientSoundManager::WeatherType audioWeatherType = audio::AmbientSoundManager::WeatherType::NONE;
|
||||
|
||||
if (weatherType == Weather::Type::RAIN) {
|
||||
if (intensity < 0.33f) {
|
||||
audioWeatherType = audio::AmbientSoundManager::WeatherType::RAIN_LIGHT;
|
||||
} else if (intensity < 0.66f) {
|
||||
audioWeatherType = audio::AmbientSoundManager::WeatherType::RAIN_MEDIUM;
|
||||
} else {
|
||||
audioWeatherType = audio::AmbientSoundManager::WeatherType::RAIN_HEAVY;
|
||||
}
|
||||
} else if (weatherType == Weather::Type::SNOW) {
|
||||
if (intensity < 0.33f) {
|
||||
audioWeatherType = audio::AmbientSoundManager::WeatherType::SNOW_LIGHT;
|
||||
} else if (intensity < 0.66f) {
|
||||
audioWeatherType = audio::AmbientSoundManager::WeatherType::SNOW_MEDIUM;
|
||||
} else {
|
||||
audioWeatherType = audio::AmbientSoundManager::WeatherType::SNOW_HEAVY;
|
||||
}
|
||||
}
|
||||
|
||||
ambientSoundManager->setWeather(audioWeatherType);
|
||||
}
|
||||
|
||||
ambientSoundManager->update(deltaTime, camPos, isIndoor, isSwimming, isBlacksmith);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue