diff options
author | erorcun <erayorcunus@gmail.com> | 2020-09-29 22:00:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 22:00:50 +0200 |
commit | f9dc00a458684ef88e733f5d0245b5e827de82c1 (patch) | |
tree | 5a9d57bca1c005b9bbd9db14e582b13ea3ebe77c /src/weapons/Explosion.cpp | |
parent | Merge pull request #727 from erorcun/miami (diff) | |
parent | now fixed properly (diff) | |
download | re3-f9dc00a458684ef88e733f5d0245b5e827de82c1.tar re3-f9dc00a458684ef88e733f5d0245b5e827de82c1.tar.gz re3-f9dc00a458684ef88e733f5d0245b5e827de82c1.tar.bz2 re3-f9dc00a458684ef88e733f5d0245b5e827de82c1.tar.lz re3-f9dc00a458684ef88e733f5d0245b5e827de82c1.tar.xz re3-f9dc00a458684ef88e733f5d0245b5e827de82c1.tar.zst re3-f9dc00a458684ef88e733f5d0245b5e827de82c1.zip |
Diffstat (limited to 'src/weapons/Explosion.cpp')
-rw-r--r-- | src/weapons/Explosion.cpp | 14 |
1 files changed, 10 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 |