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

Function xRayHitsScene

src/SB/Core/x/xScene.cpp:622–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622void xRayHitsScene(xScene* sc, xRay3* r, xCollis* coll)
623{
624 coll->dist = HUGE;
625
626 xQCData q;
627 xQuickCullForRay(&q, r);
628
629 xRayHitsGrid(&colls_grid, sc, r, xRayHitsEnt, &q, coll);
630 xRayHitsGrid(&colls_oso_grid, sc, r, xRayHitsEnt, &q, coll);
631 xRayHitsGrid(&npcs_grid, sc, r, xRayHitsEnt, &q, coll);
632
633 xCollis c;
634 iRayHitsEnv(r, sc->env, &c);
635
636 if (c.dist < coll->dist)
637 {
638 coll->dist = c.dist;
639 coll->oid = c.oid;
640 coll->optr = NULL;
641 coll->mptr = NULL;
642 }
643
644 if (coll->dist < HUGE)
645 {
646 coll->flags |= k_HIT_IT;
647 }
648 else
649 {
650 coll->flags &= ~k_HIT_IT;
651 }
652}
653
654cb_ray_hits_ent::cb_ray_hits_ent(const xRay3& ray, xCollis& coll, U8 chkby, U8 collType)
655 : ray(ray), coll(coll), chkby(chkby), collType(collType)

Callers 4

xEntBoulder_BubbleBowlFunction · 0.70
SpatulaGrabCBFunction · 0.50
HaveLOSToPosMethod · 0.50
NPCC_HaveLOSToPosFunction · 0.50

Calls 3

xQuickCullForRayFunction · 0.70
xRayHitsGridFunction · 0.70
iRayHitsEnvFunction · 0.50

Tested by

no test coverage detected