feat(model): add CM2Model::DetachAllChildrenById

This commit is contained in:
fallenoak 2025-10-27 23:10:49 -05:00
parent 2fb38d3ebb
commit aa7e548102
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 9 additions and 0 deletions

View File

@ -777,6 +777,14 @@ void CM2Model::CancelDeferredSequences(uint32_t boneIndex, bool a3) {
// TODO
}
void CM2Model::DetachAllChildrenById(uint32_t id) {
for (auto model = this->m_attachList; model; model = model->m_attachNext) {
if (model->m_attachId == id) {
model->DetachFromParent();
}
}
}
void CM2Model::DetachFromParent() {
// TODO
}

View File

@ -154,6 +154,7 @@ class CM2Model {
void AttachToParent(CM2Model* parent, uint32_t id, const C3Vector* position, int32_t a5);
void AttachToScene(CM2Scene* scene);
void CancelDeferredSequences(uint32_t boneIndex, bool a3);
void DetachAllChildrenById(uint32_t id);
void DetachFromParent();
void DetachFromScene();
void FindKey(M2ModelBoneSeq* sequence, const M2TrackBase& track, uint32_t& currentKey, uint32_t& nextKey, float& ratio);