diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-08-16 09:02:29 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-08-16 09:02:29 +0200 |
commit | d6fbf9fbe775ea838e8e8d8d607b88562f1c695b (patch) | |
tree | 16a9433725b2b63991bba7978db94449ca2c316c /src | |
parent | Fix cAudioManager::ProcessVehicleEngine return type, rename Sound Intensity (diff) | |
download | re3-d6fbf9fbe775ea838e8e8d8d607b88562f1c695b.tar re3-d6fbf9fbe775ea838e8e8d8d607b88562f1c695b.tar.gz re3-d6fbf9fbe775ea838e8e8d8d607b88562f1c695b.tar.bz2 re3-d6fbf9fbe775ea838e8e8d8d607b88562f1c695b.tar.lz re3-d6fbf9fbe775ea838e8e8d8d607b88562f1c695b.tar.xz re3-d6fbf9fbe775ea838e8e8d8d607b88562f1c695b.tar.zst re3-d6fbf9fbe775ea838e8e8d8d607b88562f1c695b.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/audio/AudioManager.cpp | 44 | ||||
-rw-r--r-- | src/audio/AudioManager.h | 19 |
2 files changed, 63 insertions, 0 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 92569f03..686b9206 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -755,6 +755,49 @@ cAudioManager::UpdateReflections() CColPoint colpoint; CEntity *ent; +#if GTA_VERSION < GTAVC_PC_10 + if (m_FrameCounter % 8 == 0) { + camPos = TheCamera.GetPosition(); + m_avecReflectionsPos[0] = camPos; + m_avecReflectionsPos[0].y += 50.0f; + if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[0], colpoint, ent, true, false, false, true, false, true, true)) + m_afReflectionsDistances[0] = Distance(camPos, colpoint.point); + else + m_afReflectionsDistances[0] = 50.0f; + } else if ((m_FrameCounter + 1) % 8 == 0) { + camPos = TheCamera.GetPosition(); + m_avecReflectionsPos[1] = camPos; + m_avecReflectionsPos[1].y -= 50.0f; + if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[1], colpoint, ent, true, false, false, true, false, true, true)) + m_afReflectionsDistances[1] = Distance(camPos, colpoint.point); + else + m_afReflectionsDistances[1] = 50.0f; + } else if ((m_FrameCounter + 2) % 8 == 0) { + camPos = TheCamera.GetPosition(); + m_avecReflectionsPos[2] = camPos; + m_avecReflectionsPos[2].x -= 50.0f; + if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[2], colpoint, ent, true, false, false, true, false, true, true)) + m_afReflectionsDistances[2] = Distance(camPos, colpoint.point); + else + m_afReflectionsDistances[2] = 50.0f; + } else if ((m_FrameCounter + 3) % 8 == 0) { + camPos = TheCamera.GetPosition(); + m_avecReflectionsPos[3] = camPos; + m_avecReflectionsPos[3].x += 50.0f; + if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[3], colpoint, ent, true, false, false, true, false, true, true)) + m_afReflectionsDistances[3] = Distance(camPos, colpoint.point); + else + m_afReflectionsDistances[3] = 50.0f; + } else if ((m_FrameCounter + 4) % 8 == 0) { + camPos = TheCamera.GetPosition(); + m_avecReflectionsPos[4] = camPos; + m_avecReflectionsPos[4].z += 50.0f; + if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[4].z, colpoint, ent, true, false, false, false, true, false, nil)) + m_afReflectionsDistances[4] = colpoint.point.z - camPos.z; + else + m_afReflectionsDistances[4] = 50.0f; + } +#else if (m_FrameCounter % 8 == 0) { camPos = TheCamera.GetPosition(); m_avecReflectionsPos[0] = camPos; @@ -824,6 +867,7 @@ cAudioManager::UpdateReflections() else m_afReflectionsDistances[7] = 100.0f; } +#endif } void diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 383644e0..c52eef8f 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -184,6 +184,24 @@ public: VALIDATE_SIZE(cVehicleParams, 0x1C); +#if GTA_VERSION < GTAVC_PC_10 +enum { + /* + REFLECTION_YMAX = 0, top + REFLECTION_YMIN = 1, bottom + REFLECTION_XMIN = 2, left + REFLECTION_XMAX = 3, right + REFLECTION_ZMAX = 4, + */ + + REFLECTION_TOP = 0, + REFLECTION_BOTTOM, + REFLECTION_LEFT, + REFLECTION_RIGHT, + REFLECTION_UP, + MAX_REFLECTIONS, +}; +#else enum { REFLECTION_NORTH = 0, REFLECTION_SOUTH, @@ -195,6 +213,7 @@ enum { REFLECTION_CEIL_EAST, MAX_REFLECTIONS, }; +#endif enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED }; enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED }; |