From 5ee3fd143b497576a77fccced7cbf667c1d27380 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Fri, 15 Dec 2023 07:11:35 -0500 Subject: [PATCH 1/3] Update engine.cpp --- SQCSim2021/engine.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index b00e88e..5461f80 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1409,18 +1409,19 @@ void Engine::Render(float elapsedTime) { m_chunkmod = nullptr; } m_bullets[x] = nullptr; - //if (m_whoosh[x]) - // m_whoosh[x]->drop(); - //m_whoosh[x] = nullptr; + if (m_whoosh[x]){ + m_whoosh[x]->drop(); + m_whoosh[x] = nullptr; + } break; } - // else if (!m_whoosh[x]) { - // m_whoosh[x] = m_audio.Create3DAudioObj(m_whoosh[x], AUDIO_PATH "noise.wav", m_bullets[x]->getPos(), m_bullets[x]->getVel(), true, (m_bullets[x]->getPos() - m_player.GetPosition()).Length()); - // } - // else { - // Vector3f pos = m_bullets[x]->getPos(), vel = m_bullets[x]->getVel(); - // m_audio.Render3DAudioObj(m_whoosh[x], pos, vel, 5 - (m_bullets[x]->getPos() - m_player.GetPosition()).Length()); - // } + else if (!m_whoosh[x]) { + m_whoosh[x] = m_audio.Create3DAudioObj(m_whoosh[x], AUDIO_PATH "noise.wav", m_bullets[x]->getPos(), m_bullets[x]->getVel(), true, (m_bullets[x]->getPos() - m_player.GetPosition()).Length()); + } + else { + Vector3f pos = m_bullets[x]->getPos(), vel = m_bullets[x]->getVel(); + m_audio.Render3DAudioObj(m_whoosh[x], pos, vel, m_sfxvolume); + } } } } From 4d278dfdea714d596a9f54bb7340d6d7750337c4 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 16 Dec 2023 12:05:14 -0500 Subject: [PATCH 2/3] Pow pow t'es mow. --- SQCSim2021/audio.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQCSim2021/audio.cpp b/SQCSim2021/audio.cpp index 97bed1c..5950abe 100644 --- a/SQCSim2021/audio.cpp +++ b/SQCSim2021/audio.cpp @@ -11,9 +11,9 @@ Audio::Audio() { Audio::Audio(const char * music, const char* menumusic) { m_engine = irrklang::createIrrKlangDevice(); m_engine->setDopplerEffectParameters(1); - m_engine->setRolloffFactor(2); - m_engine->setDefault3DSoundMinDistance(.1); - m_engine->setDefault3DSoundMaxDistance(1000); + m_engine->setRolloffFactor(1); + m_engine->setDefault3DSoundMinDistance(1); + m_engine->setDefault3DSoundMaxDistance(100); m_music = m_engine->play2D(music, true, true, true, irrklang::ESM_STREAMING); m_menumusic = m_engine->play2D(menumusic, true, true, true, irrklang::ESM_STREAMING); m_music->setVolume(.5); From 8062d8e31dee5dcd7af49c5e8bb461c1e295b402 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 16 Dec 2023 12:05:57 -0500 Subject: [PATCH 3/3] lol --- SQCSim2021/audio.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SQCSim2021/audio.cpp b/SQCSim2021/audio.cpp index 5950abe..161a73b 100644 --- a/SQCSim2021/audio.cpp +++ b/SQCSim2021/audio.cpp @@ -2,9 +2,9 @@ Audio::Audio() { m_engine = irrklang::createIrrKlangDevice(); - m_engine->setDopplerEffectParameters(10); - m_engine->setRolloffFactor(2); - m_engine->setDefault3DSoundMinDistance(.1); + m_engine->setDopplerEffectParameters(1); + m_engine->setRolloffFactor(1); + m_engine->setDefault3DSoundMinDistance(1); m_engine->setDefault3DSoundMaxDistance(1000); }