mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
93f873b521
commit
c35b40391f
4 changed files with 37 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue