Add water footstep splashes and reduce lake wave amplitude

- Play WaterFootstep splash sounds when wading in shallow water
- Spawn foot splash particles at water surface on each water footstep
- Reduce inland water wave amplitude from 0.18 to 0.08 for calmer lakes
This commit is contained in:
Kelsi 2026-02-23 06:58:46 -08:00
parent 93f873b521
commit c35b40391f
4 changed files with 37 additions and 2 deletions

View file

@ -2590,7 +2590,20 @@ void Renderer::update(float deltaTime) {
float animDurationMs = 0.0f;
if (characterRenderer->getAnimationState(characterInstanceId, animId, animTimeMs, animDurationMs) &&
shouldTriggerFootstepEvent(animId, animTimeMs, animDurationMs)) {
footstepManager->playFootstep(resolveFootstepSurface(), cameraController->isSprinting());
auto surface = resolveFootstepSurface();
footstepManager->playFootstep(surface, cameraController->isSprinting());
// Play additional splash sound and spawn foot splash particles when wading
if (surface == audio::FootstepSurface::WATER) {
if (movementSoundManager) {
movementSoundManager->playWaterFootstep(audio::MovementSoundManager::CharacterSize::MEDIUM);
}
if (swimEffects && waterRenderer) {
auto wh = waterRenderer->getWaterHeightAt(characterPosition.x, characterPosition.y);
if (wh) {
swimEffects->spawnFootSplash(characterPosition, *wh);
}
}
}
}
mountFootstepNormInitialized = false;
} else {