summaryrefslogtreecommitdiffstats
path: root/src/weapons
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-09-30 01:44:02 +0200
committereray orçunus <erayorcunus@gmail.com>2020-09-30 01:44:02 +0200
commitf740588780897a2d9d0b29724d617b0eaa9b5025 (patch)
tree2d9bb7a9ae9d10a2ebfceba7179b47c249b3e19a /src/weapons
parentPopulation and many small classes done, mouse AUX buttons, Frontend, Hud, fixes (diff)
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.gz
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.bz2
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.lz
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.xz
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.zst
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.zip
Diffstat (limited to 'src/weapons')
-rw-r--r--src/weapons/Explosion.cpp14
-rw-r--r--src/weapons/Explosion.h1
2 files changed, 11 insertions, 4 deletions
diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp
index 74af1375..5d4b8f80 100644
--- a/src/weapons/Explosion.cpp
+++ b/src/weapons/Explosion.cpp
@@ -31,6 +31,16 @@ void
CExplosion::Initialise()
{
debug("Initialising CExplosion...\n");
+ ClearAllExplosions();
+ AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1);
+ if (AudioHandle >= 0)
+ DMAudio.SetEntityStatus(AudioHandle, true);
+ debug("CExplosion ready\n");
+}
+
+void
+CExplosion::ClearAllExplosions()
+{
for (int i = 0; i < ARRAY_SIZE(gaExplosion); i++) {
gaExplosion[i].m_ExplosionType = EXPLOSION_GRENADE;
gaExplosion[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
@@ -44,10 +54,6 @@ CExplosion::Initialise()
gaExplosion[i].m_fStartTime = 0.0f;
gaExplosion[i].m_bIsBoat = false;
}
- AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1);
- if (AudioHandle >= 0)
- DMAudio.SetEntityStatus(AudioHandle, true);
- debug("CExplosion ready\n");
}
void
diff --git a/src/weapons/Explosion.h b/src/weapons/Explosion.h
index cfa75ec1..f709012e 100644
--- a/src/weapons/Explosion.h
+++ b/src/weapons/Explosion.h
@@ -37,6 +37,7 @@ class CExplosion
float m_fZshift;
public:
static void Initialise();
+ static void ClearAllExplosions();
static void Shutdown();
static int8 GetExplosionActiveCounter(uint8 id);
static void ResetExplosionActiveCounter(uint8 id);