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

Function xRayHitsEnt

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

Source from the content-addressed store, hash-verified

557}
558
559void xRayHitsEnt(xScene* sc, xRay3* r, xQCData* qcr, xEnt* ent, void* colldata)
560{
561 xCollis* coll = (xCollis*)colldata;
562 xCollis c;
563
564 if (ent->chkby == XENT_COLLTYPE_NONE)
565 {
566 return;
567 }
568
569 if (qcr && !xQuickCullIsects(qcr, &ent->bound.qcd))
570 {
571 return;
572 }
573
574 xRayHitsBound(r, &ent->bound, &c);
575
576 if (!(c.flags & 0x1))
577 {
578 return;
579 }
580
581 if (c.dist < coll->dist)
582 {
583 coll->dist = c.dist;
584 coll->oid = ent->id;
585 coll->optr = ent;
586 coll->mptr = ent->model;
587 }
588}
589
590void xRayHitsTikiLandableScene(xScene* sc, xRay3* r, xCollis* coll)
591{

Callers

nothing calls this directly

Calls 2

xQuickCullIsectsFunction · 0.70
xRayHitsBoundFunction · 0.70

Tested by

no test coverage detected