mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(model): add CM2Model::HasAttachment
This commit is contained in:
parent
9acffa737e
commit
7bcb1363e3
@ -1081,6 +1081,18 @@ C3Vector CM2Model::GetPosition() {
|
||||
return reinterpret_cast<C3Vector&>(this->matrixF4.d0) * this->m_scene->m_viewInv;
|
||||
}
|
||||
|
||||
bool CM2Model::HasAttachment(uint32_t id) {
|
||||
if (!this->m_loaded) {
|
||||
this->WaitForLoad("HasAttachment");
|
||||
}
|
||||
|
||||
if (id < this->m_shared->m_data->attachmentIndicesById.Count()) {
|
||||
return this->m_shared->m_data->attachmentIndicesById[id] < this->m_shared->m_data->attachments.Count();
|
||||
}
|
||||
|
||||
return this->m_shared->m_data->attachments.Count() > 0xFFFF;
|
||||
}
|
||||
|
||||
int32_t CM2Model::Initialize(CM2Scene* scene, CM2Shared* shared, CM2Model* a4, uint32_t flags) {
|
||||
this->AttachToScene(scene);
|
||||
|
||||
|
||||
@ -167,6 +167,7 @@ class CM2Model {
|
||||
CAaBox& GetBoundingBox(CAaBox& bounds);
|
||||
HCAMERA GetCameraByIndex(uint32_t index);
|
||||
C3Vector GetPosition();
|
||||
bool HasAttachment(uint32_t id);
|
||||
int32_t Initialize(CM2Scene* scene, CM2Shared* shared, CM2Model* a4, uint32_t flags);
|
||||
int32_t InitializeLoaded();
|
||||
int32_t IsBatchDoodadCompatible(M2Batch* batch);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user