mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(model): process attached models in CM2Model::InitializeLoaded
This commit is contained in:
parent
642c763612
commit
fb1922941e
@ -1298,6 +1298,27 @@ int32_t CM2Model::InitializeLoaded() {
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
// Process model attachments that occurred during load
|
||||||
|
|
||||||
|
CM2Model* attachNext = nullptr;
|
||||||
|
for (auto attachModel = this->m_attachList; attachModel; attachModel = attachNext) {
|
||||||
|
attachNext = attachModel->m_attachNext;
|
||||||
|
|
||||||
|
uint16_t attachIndex = 0xFFFF;
|
||||||
|
|
||||||
|
if (attachModel->m_attachId < this->m_shared->m_data->attachments.Count()) {
|
||||||
|
attachIndex = this->m_shared->m_data->attachmentIndicesById[attachModel->m_attachId];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attachIndex != 0xFFFF || attachModel->m_flag40000) {
|
||||||
|
attachModel->m_attachIndex = attachIndex;
|
||||||
|
} else {
|
||||||
|
attachModel->DetachFromParent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
this->m_loaded = 1;
|
this->m_loaded = 1;
|
||||||
|
|
||||||
uint32_t savedTime = this->m_scene->m_time;
|
uint32_t savedTime = this->m_scene->m_time;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user