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

Function zLightAddLocal

src/SB/Game/zLight.cpp:247–259  ·  view source on GitHub ↗

Float issue

Source from the content-addressed store, hash-verified

245
246// Float issue
247void zLightAddLocal(xEnt* ent)
248{
249 xVec3 default_light_pos = *xEntGetPos(ent);
250 default_light_pos.y += 1.0f;
251 if (!ent->entShadow)
252 {
253 ent->entShadow = (xEntShadow*)xMemAlloc(gActiveHeap, 40, 0);
254 xEntInitShadow(*ent, *ent->entShadow);
255 ent->entShadow->pos = default_light_pos;
256 ent->entShadow->vec = sDefaultShadowVec;
257 }
258 xShadowSetLight(&ent->entShadow->pos, &ent->entShadow->vec, 1.0f);
259}
260
261void zLightRemoveLocalEnv()
262{

Callers 1

xEntRenderFunction · 0.50

Calls 4

xEntGetPosFunction · 0.85
xEntInitShadowFunction · 0.85
xShadowSetLightFunction · 0.85
xMemAllocFunction · 0.50

Tested by

no test coverage detected