Merge branch 'master' into SQC-15_online
This commit is contained in:
commit
ca1ab7301d
@ -2,18 +2,18 @@
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -1410,18 +1410,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user