diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-07-27 22:02:45 +0300 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-07-27 22:02:45 +0300 |
commit | ad2ccdb44a9a8d5a29d3184b2ff03a258a96bdfb (patch) | |
tree | c69d24c2f3e98a1543e64b74de7450e4052d04f4 /src/audio/AudioCollision.h | |
parent | ec7d70218595fe9c9c6c65a71893e48dc3d3ec38 (diff) | |
parent | 782d38c6b7bec1383a45e5ac074274be17311892 (diff) |
Merge branch 'miami' into lcs
Diffstat (limited to 'src/audio/AudioCollision.h')
-rw-r--r-- | src/audio/AudioCollision.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/audio/AudioCollision.h b/src/audio/AudioCollision.h index a00b16d9..31be0334 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(); }; |