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

Function zNPCTiki_InitStacking

src/SB/Game/zNPCTypeTiki.cpp:64–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void zNPCTiki_InitStacking(zScene* zsc)
65{
66 for (S32 i = 0; i < zsc->num_npcs; i++)
67 {
68 xNPCBasic* npc = (xNPCBasic*)zsc->npcs[i];
69
70 U32 type = npc->SelfType() & ~0xFF;
71
72 if (type != 'NTT\0')
73 {
74 continue;
75 }
76
77 zNPCTiki* tiki = (zNPCTiki*)npc;
78 if (npc->SelfType() != NPC_TYPE_TIKI_LOVEY)
79 {
80 tiki->FindParents(zsc);
81
82 if (tiki->numParents == 0)
83 {
84 F32 dh = tiki->landHt - tiki->bound.box.box.lower.y;
85
86 tiki->bound.box.box.lower.y += dh;
87 tiki->bound.box.box.upper.y += dh;
88 tiki->bound.box.center.y += dh;
89 tiki->model->Mat->pos.y += dh;
90 }
91 }
92
93 tiki->tikiFlag &= ~1;
94 }
95
96 orphanList = NULL;
97}
98
99// float scheduling issue
100void zNPCTiki_InitFX(zScene* scene)

Callers 2

zSceneResetFunction · 0.70
zSceneSetupFunction · 0.70

Calls 2

SelfTypeMethod · 0.80
FindParentsMethod · 0.80

Tested by

no test coverage detected