1
0
Fork 0
mirror of https://github.com/isledecomp/isle.git synced 2025-04-05 19:24:58 -04:00

Match Act2Brick::Create ()

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz 2025-02-15 16:47:55 +01:00 committed by GitHub
parent 347da7d555
commit d88ab0a50a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions
LEGO1/lego
legoomni/src/entity
sources/roi

View file

@ -19,6 +19,7 @@
DECOMP_SIZE_ASSERT(Act2Brick, 0x194)
// GLOBAL: LEGO1 0x100f7a38
// GLOBAL: BETA10 0x101dc480
const LegoChar* Act2Brick::g_lodNames[] =
{"xchbase1", "xchblad1", "xchseat1", "xchtail1", "xhback1", "xhljet1", "xhmidl1", "xhmotr1", "xhsidl1", "xhsidr1"};
@ -51,8 +52,12 @@ MxResult Act2Brick::Create(MxS32 p_index)
sprintf(name, "chbrick%d", p_index);
m_roi = CharacterManager()->CreateAutoROI(name, g_lodNames[p_index], FALSE);
assert(m_roi);
BoundingSphere sphere = m_roi->GetBoundingSphere();
#ifndef BETA10
BoundingSphere sphere;
sphere.Center() = m_roi->GetBoundingSphere().Center();
sphere.Center()[1] -= 0.3;
if (p_index < 6) {
@ -63,6 +68,8 @@ MxResult Act2Brick::Create(MxS32 p_index)
}
m_roi->SetBoundingSphere(sphere);
#endif
m_roi->SetEntity(this);
CurrentWorld()->Add(this);
m_unk0x164 = 1;

View file

@ -73,7 +73,9 @@ public:
BoundingSphere& GetBoundingSphere() { return m_sphere; }
// FUNCTION: BETA10 0x10013400
void SetEntity(LegoEntity* p_entity) { m_entity = p_entity; }
void SetComp(CompoundObject* p_comp) { comp = p_comp; }
void SetBoundingSphere(const BoundingSphere& p_sphere) { m_sphere = m_world_bounding_sphere = p_sphere; }
void SetUnknown0x80(const BoundingBox& p_unk0x80) { m_unk0x80 = p_unk0x80; }