From a064b3a687b6ba4b112eaf1e69738b27358baabf Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 26 Jul 2021 04:18:41 +0300 Subject: Audio changes: - Reorder AudioCollision.cpp functions into original order - Add missing cAudioCollision::Reset() - Move cAudioCollision ctor into .h (like original) - Fix argument types for ped comment functions and more - Fix wrong names of ped comment functions - Fix incorrect ped comments - Remove getters - Reorder declarations of cAudioManager - Wrap PC only functions around ifdef - Add cAudioManager methods from PS2 and mobile --- src/audio/AudioCollision.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/audio/AudioCollision.h') diff --git a/src/audio/AudioCollision.h b/src/audio/AudioCollision.h index 0a058916..a201d500 100644 --- a/src/audio/AudioCollision.h +++ b/src/audio/AudioCollision.h @@ -17,7 +17,18 @@ public: float m_fDistance; int32 m_nBaseVolume; - // no methods + cAudioCollision() { Reset(); } + + void Reset() + { + m_pEntity1 = nil; + m_pEntity2 = nil; + m_bSurface1 = 0; + m_bSurface2 = 0; + m_fIntensity1 = m_fIntensity2 = 0.0f; + m_vecPosition = CVector(0.0f, 0.0f, 0.0f); + m_fDistance = 0.0f; + } }; VALIDATE_SIZE(cAudioCollision, 40); @@ -31,7 +42,15 @@ public: uint8 m_bCollisionsInQueue; cAudioCollision m_sQueue; - cAudioCollisionManager(); + cAudioCollisionManager() + { + m_sQueue.Reset(); + + for(int i = 0; i < NUMAUDIOCOLLISIONS; i++) + m_bIndicesTable[i] = NUMAUDIOCOLLISIONS; + + m_bCollisionsInQueue = 0; + } void AddCollisionToRequestedQueue(); }; -- cgit v1.2.3