diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-07-27 21:02:25 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-07-27 21:02:25 +0200 |
commit | 782d38c6b7bec1383a45e5ac074274be17311892 (patch) | |
tree | 0022d3ff87dda553f2f34e3f6426409cfa628410 /src/audio/AudioCollision.h | |
parent | Fix stuck looking flag when answering phone and idle weapon animation (diff) | |
download | re3-782d38c6b7bec1383a45e5ac074274be17311892.tar re3-782d38c6b7bec1383a45e5ac074274be17311892.tar.gz re3-782d38c6b7bec1383a45e5ac074274be17311892.tar.bz2 re3-782d38c6b7bec1383a45e5ac074274be17311892.tar.lz re3-782d38c6b7bec1383a45e5ac074274be17311892.tar.xz re3-782d38c6b7bec1383a45e5ac074274be17311892.tar.zst re3-782d38c6b7bec1383a45e5ac074274be17311892.zip |
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(); }; |