summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioCollision.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/AudioCollision.h')
-rw-r--r--src/audio/AudioCollision.h23
1 files changed, 21 insertions, 2 deletions
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();
};