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

Method Init

src/SB/Game/zNPCTypeCommon.cpp:207–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void zNPCCommon::Init(xEntAsset* entass)
208{
209 xSceneID2Name(globals.sceneCur, entass->id);
210 xNPCBasic::Init(entass);
211
212 this->entass = entass;
213 this->npcass = (xEntNPCAsset*)(entass + 1);
214
215 xLinkAsset* npclinx = (xLinkAsset*)(this->npcass + 1);
216 if (linkCount)
217 {
218 this->link = npclinx;
219 }
220 else
221 {
222 this->link = NULL;
223 }
224
225 this->parmdata = zEntGetModelParams(this->entass->modelInfoID, &this->pdatsize);
226
227 this->cfg_npc = this->ConfigFind(this->entass->modelInfoID);
228 if (!this->cfg_npc)
229 {
230 this->cfg_npc = this->ConfigCreate(this->entass->modelInfoID);
231 this->ParseINI();
232 }
233
234 if (this->cfg_npc && xVec3Length2(&this->cfg_npc->scl_model) > 0.0f)
235 {
236 this->flg_misc |= 0x4;
237 }
238
239 this->InitBounds();
240}
241
242void zNPCCommon::InitBounds()
243{

Callers

nothing calls this directly

Calls 8

ConfigFindMethod · 0.95
ConfigCreateMethod · 0.95
ParseINIMethod · 0.95
InitBoundsMethod · 0.95
xSceneID2NameFunction · 0.85
xVec3Length2Function · 0.85
zEntGetModelParamsFunction · 0.70
InitFunction · 0.50

Tested by

no test coverage detected