From a3aeed059d6c79eeb77ca06b91c12676007189b1 Mon Sep 17 00:00:00 2001 From: krystalgamer Date: Tue, 23 Jul 2024 17:21:05 +0200 Subject: [PATCH] CChopperMissile::~CChopperMissile --- chopper.cpp | 12 ++++++++++++ chopper.h | 1 + 2 files changed, 13 insertions(+) diff --git a/chopper.cpp b/chopper.cpp index 76ee1a7..752b324 100644 --- a/chopper.cpp +++ b/chopper.cpp @@ -17,6 +17,18 @@ extern i16 **gTrigNodes; extern const char *gObjFile; extern u8 gObjFileRegion; +// @Ok +CChopperMissile::~CChopperMissile(void) +{ + this->DeleteFrom(reinterpret_cast(&BaddyList)); + + if (this->field_10C) + SFX_Stop(this->field_10C); + + if (this->field_F8) + delete this->field_F8; +} + // @Ok INLINE i32 CChopperMissile::GetFinalTargetNode(i32 a2) { diff --git a/chopper.h b/chopper.h index 2776c9c..0ca0d24 100644 --- a/chopper.h +++ b/chopper.h @@ -187,6 +187,7 @@ class CChopperMissile : public CBody { public: EXPORT CChopperMissile(CVector*, CSuper*, i32, i32); + EXPORT virtual ~CChopperMissile(void); EXPORT i32 GetFinalTargetNode(i32); EXPORT void CommonInitialisation(void);