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

Function NPC_alwaysUseSphere

src/SB/Core/x/xNPCBasic.cpp:111–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void NPC_alwaysUseSphere(xEnt* ent, xVec3* value)
112{
113 xNPCBasic* npc = (xNPCBasic*)ent;
114 const xVec3 vec = { 0, 0, 0 };
115 xVec3 bndcent = vec;
116
117 xVec3Copy(&bndcent, xEntGetPos(npc));
118 bndcent.y += 0.75f;
119
120 npc->bound.type = XBOUND_TYPE_SPHERE;
121 xVec3Copy(&npc->bound.sph.center, &bndcent);
122 npc->bound.sph.r = 0.75f;
123 if (npc->bound.type != XBOUND_TYPE_NA)
124 {
125 xQuickCullForBound(&npc->bound.qcd, &npc->bound);
126 }
127
128 zGridUpdateEnt(npc);
129 if (npc->DBG_IsNormLog(eNPCDCAT_Eight, 2) || npc->DBG_IsNormLog(eNPCDCAT_Seven, 2))
130 {
131 xDrawSetColor(g_PIMP_GOLD);
132 xBoundDraw(&npc->bound);
133 }
134}
135
136void NPC_spdBasedColFreq(xNPCBasic* npc, F32 dt)
137{

Callers

nothing calls this directly

Calls 6

xVec3CopyFunction · 0.85
xEntGetPosFunction · 0.85
xDrawSetColorFunction · 0.85
xBoundDrawFunction · 0.85
xQuickCullForBoundFunction · 0.70
zGridUpdateEntFunction · 0.50

Tested by

no test coverage detected