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;}