correction client

This commit is contained in:
Marc-Éric Martel 2023-10-27 12:23:45 -04:00
parent 6a8a505167
commit da594fa3a2
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.18.4)
project(SQCSim-Client VERSION 0.8) project(SQCSim-Client VERSION 0.8)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_STANDARD_REQUIRED True) set(CMAKE_STANDARD_REQUIRED True)
set(CMAKE_BUILD_DIRECTORY "./build") set(CMAKE_BUILD_DIRECTORY "./build")

View File

@ -756,7 +756,10 @@ void Engine::Render(float elapsedTime) {
else if (!m_whoosh[x]) { 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()); 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 m_audio.Render3DAudioObj(m_whoosh[x], m_bullets[x]->getPos(), m_bullets[x]->getVel(), 5 - (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());
}
} }
} }