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

Function iSphereHitsEnv

src/SB/Core/gc/iCollide.cpp:625–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625U32 iSphereHitsEnv(const xSphere* b, const xEnv* env, xCollis* coll)
626{
627 RpIntersection isx;
628 isx.type = rpINTERSECTSPHERE;
629 memcpy(&isx.t.sphere, b, sizeof(xSphere));
630
631 coll->flags &= ~1;
632 coll->dist = FLOAT_MAX;
633
634 if (env->geom->jsp != NULL)
635 {
636 sCollidingJSP = 1;
637 xClumpColl_ForAllIntersections(env->geom->jsp->colltree, &isx, sphereHitsEnvCB, coll);
638 sCollidingJSP = 0;
639 }
640 else
641 {
642 RpCollisionWorldForAllIntersections(env->geom->world, &isx, sphereHitsEnvCB, coll);
643 if (env->geom->collision != NULL)
644 {
645 RpCollisionWorldForAllIntersections(env->geom->collision, &isx, sphereHitsEnvCB, coll);
646 }
647 }
648
649 return coll->flags & 1;
650}
651
652S32 iSphereHitsEnv3(const xSphere* b, const xEnv* env, xCollis* colls, U8 ncolls, F32 sth)
653{

Callers

nothing calls this directly

Calls 2

memcpyFunction · 0.85

Tested by

no test coverage detected