From 22a55d878d90e0087d629ec2e98d7d546aaaaf61 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 16 May 2001 20:16:58 +0000 Subject: [PATCH] --- source/enemy/nworm.cpp | 9 +++++++++ source/enemy/nworm.h | 1 + 2 files changed, 10 insertions(+) diff --git a/source/enemy/nworm.cpp b/source/enemy/nworm.cpp index 68b9cc2c2..30859cf00 100644 --- a/source/enemy/nworm.cpp +++ b/source/enemy/nworm.cpp @@ -174,6 +174,13 @@ void CNpcParasiticWormEnemy::postInit() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +void CNpcParasiticWormSegment::shutdown() +{ + delete m_actorGfx; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void CNpcParasiticWormEnemy::shutdown() { // delete worm segments @@ -186,6 +193,8 @@ void CNpcParasiticWormEnemy::shutdown() oldSegment = currentSegment; currentSegment = currentSegment->m_nextSegment; + + oldSegment->shutdown(); delete oldSegment; } diff --git a/source/enemy/nworm.h b/source/enemy/nworm.h index ffc1cc2fa..34ccda602 100644 --- a/source/enemy/nworm.h +++ b/source/enemy/nworm.h @@ -18,6 +18,7 @@ class CNpcParasiticWormSegment { public: virtual void init(); + virtual void shutdown(); virtual void render(); virtual void processEnemyCollision( CThing *thisThing ); virtual void setScale( u16 scale ) {m_scale = scale;}