Improve and fix crash in SoundSystemWindows

Add 3D Sound Listener, Fix crash when DirectSound fails to initialize. Add second argument to setListenerAngle. Implement setListenerAngle and setListenerPos in Minecraft.cpp (Is this a good place to put it?)
This commit is contained in:
f
2023-08-01 22:02:24 +02:00
parent d8cdbe4913
commit 9bfec799e2
5 changed files with 117 additions and 16 deletions

View File

@@ -527,6 +527,15 @@ void Minecraft::tick()
{
m_pTextures->tick();
m_pParticleEngine->tick();
#ifndef ORIGINAL_CODE
if (m_pMobPersp)
{
m_pSoundEngine->m_soundSystem.setListenerPos(m_pMobPersp->m_pos.x, m_pMobPersp->m_pos.y, m_pMobPersp->m_pos.z);
m_pSoundEngine->m_soundSystem.setListenerAngle(m_pMobPersp->m_yaw, m_pMobPersp->m_pitch);
}
#endif
}
if (field_D14)