MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / Init

Method Init

src/SB/Game/zNPCTypeBossSB1.cpp:263–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void zNPCB_SB1::Init(xEntAsset* asset)
264{
265 this->zNPCCommon::Init(asset);
266
267 sSB1_Ptr = this;
268
269 S32 i = 0;
270
271 xModelInstance* minst = this->model;
272 while (minst)
273 {
274 minst->Data->boundingSphere.radius = 100.0f;
275 this->m_subModels[i] = minst;
276 i = i + 1;
277 minst = minst->Next;
278 }
279
280 for (i = 0; i < 4; i++)
281 {
282 iModelTagSetup(&this->m_leftArmTags[i], this->m_subModels[2]->Data, BossArmTags[i].x,
283 BossArmTags[i].y, BossArmTags[i].z);
284
285 iModelTagSetup(&this->m_rightArmTags[i], this->m_subModels[3]->Data, BossArmTags[i + 4].x,
286 BossArmTags[i + 4].y, BossArmTags[i + 4].z);
287 }
288
289 for (i = 0; i < 4; i++)
290 {
291 iModelTagSetup(&this->m_feetTags[i], this->m_subModels[1]->Data, BossFeetTags[i].x,
292 BossFeetTags[i].y, BossFeetTags[i].z);
293 }
294
295 // get object by hash of each thing and assign each one
296 this->m_armColl[0] = (zEnt*)zSceneFindObject(xStrHash("DUMMY_ARMCOLL_LEFT"));
297 this->m_armColl[1] = (zEnt*)zSceneFindObject(xStrHash("DUMMY_ARMCOLL_RIGHT"));
298 this->m_bodyColl = (zEnt*)zSceneFindObject(xStrHash("DUMMY_BODYCOLL"));
299 this->m_armTgt[0] = (zEnt*)zSceneFindObject(xStrHash("DUMMY_ARMTGT_LEFT"));
300 this->m_armTgt[1] = (zEnt*)zSceneFindObject(xStrHash("DUMMY_ARMTGT_RIGHT"));
301
302 SB1_ResetGlobalStuff();
303}
304
305static S32 idleCB(xGoal* rawgoal, void*, en_trantype* trantype, F32 dt, void*);
306static S32 tauntCB(xGoal* rawgoal, void*, en_trantype* trantype, F32 dt, void*);

Callers

nothing calls this directly

Calls 4

zSceneFindObjectFunction · 0.85
SB1_ResetGlobalStuffFunction · 0.70
iModelTagSetupFunction · 0.50
xStrHashFunction · 0.50

Tested by

no test coverage detected