diff --git a/Escape-the-Dawn/Sounds/swoosh3.wav b/Escape-the-Dawn/Sounds/swoosh3.wav new file mode 100644 index 0000000..5cc1156 Binary files /dev/null and b/Escape-the-Dawn/Sounds/swoosh3.wav differ diff --git a/Escape-the-Dawn/Systems/PlayerSystem.cpp b/Escape-the-Dawn/Systems/PlayerSystem.cpp index 4824258..dd7f559 100644 --- a/Escape-the-Dawn/Systems/PlayerSystem.cpp +++ b/Escape-the-Dawn/Systems/PlayerSystem.cpp @@ -219,14 +219,14 @@ void Systems::PlayerSystem::UpdateEntity(double dt, EntityID entity, EntityID pa m_World->AddComponent(swoosh, "Transform"); auto swooshSound = m_World->AddComponent(swoosh, "SoundEmitter"); float gainchanger = float(transform->Velocity.z) / float(m_basespeed); - swooshSound->Gain = 2 * gainchanger; + swooshSound->Gain = 2.f * gainchanger; swooshSound->MaxDistance = 1000; - swooshSound->ReferenceDistance = 2.f; + swooshSound->ReferenceDistance = 1.5f * gainchanger; swooshSound->Pitch = 1.f - (glm::length(parentTransform->Scale) / 12.f) * 0.5f; LOG_ERROR("Pitch: %f", swooshSound->Pitch); LOG_ERROR("Gain: %f. Vel: %f", swooshSound->Gain, transform->Velocity.z); auto soundSystem = m_World->GetSystem("SoundSystem"); - soundSystem->PlaySound(swooshSound.get(), "Sounds/swoosh.wav"); + soundSystem->PlaySound(swooshSound.get(), "Sounds/swoosh3.wav"); m_World->RemoveEntity(ent); } }