Update engine.cpp
This commit is contained in:
parent
e4316e7d8d
commit
5ee3fd143b
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user