diff --git a/src/model/CM2Model.cpp b/src/model/CM2Model.cpp index f9aa868..6e4907e 100644 --- a/src/model/CM2Model.cpp +++ b/src/model/CM2Model.cpp @@ -76,6 +76,28 @@ uint16_t CM2Model::Sub8260C0(M2Data* data, uint32_t sequenceId, int32_t a3) { return -1; } +CM2Model::~CM2Model() { + // TODO + + // Unlink from lists + + if (this->m_animatePrev) { + *this->m_animatePrev = this->m_animateNext; + } + if (this->m_animateNext) { + this->m_animateNext->m_animatePrev = this->m_animatePrev; + } + + if (this->m_drawPrev) { + *this->m_drawPrev = this->m_drawNext; + } + if (this->m_drawNext) { + this->m_drawNext->m_drawPrev = this->m_drawPrev; + } + + // TODO +} + void CM2Model::AddRef() { this->m_refCount++; } diff --git a/src/model/CM2Model.hpp b/src/model/CM2Model.hpp index e3896b8..2dd47aa 100644 --- a/src/model/CM2Model.hpp +++ b/src/model/CM2Model.hpp @@ -143,6 +143,7 @@ class CM2Model { , m_flag200000(0) , m_flag400000(0) {}; + ~CM2Model(); void AddRef(); void Animate(); void AnimateAttachmentsMT();