mirror of https://github.com/AxioDL/metaforce.git
Update nod
This commit is contained in:
parent
b7f88906ca
commit
704e1b110a
|
@ -1062,7 +1062,7 @@ bool MovingSphereAABox(const zeus::CSphere& sphere, const zeus::CAABox& aabb, co
|
||||||
bool useNextAxis1 = inBounds1 ? nextAxis2 : nextAxis1;
|
bool useNextAxis1 = inBounds1 ? nextAxis2 : nextAxis1;
|
||||||
bool useNextAxis2 = inBounds1 ? nextAxis1 : nextAxis2;
|
bool useNextAxis2 = inBounds1 ? nextAxis1 : nextAxis2;
|
||||||
|
|
||||||
int pointFlags = ((1 << useNextAxis1) * (inBounds1 ? inMin2 : inMin1)) | ((1 << axis) * sign);
|
int pointFlags = ((1 << int(useNextAxis1)) * (inBounds1 ? inMin2 : inMin1)) | ((1 << axis) * sign);
|
||||||
zeus::CVector3f aabbPoint2 = aabb.getPoint(pointFlags);
|
zeus::CVector3f aabbPoint2 = aabb.getPoint(pointFlags);
|
||||||
float d;
|
float d;
|
||||||
if (LineCircleIntersection2d(sphere.position, dir, zeus::CSphere(aabbPoint2, sphere.radius),
|
if (LineCircleIntersection2d(sphere.position, dir, zeus::CSphere(aabbPoint2, sphere.radius),
|
||||||
|
@ -1071,7 +1071,7 @@ bool MovingSphereAABox(const zeus::CSphere& sphere, const zeus::CAABox& aabb, co
|
||||||
point = sphere.position + d * dir;
|
point = sphere.position + d * dir;
|
||||||
if (point[useNextAxis2] > aabb.max[useNextAxis2])
|
if (point[useNextAxis2] > aabb.max[useNextAxis2])
|
||||||
{
|
{
|
||||||
zeus::CVector3f aabbPoint3 = aabb.getPoint(pointFlags | (1 << useNextAxis2));
|
zeus::CVector3f aabbPoint3 = aabb.getPoint(pointFlags | (1 << int(useNextAxis2)));
|
||||||
if (point[useNextAxis2] < expAABB.max[useNextAxis2])
|
if (point[useNextAxis2] < expAABB.max[useNextAxis2])
|
||||||
{
|
{
|
||||||
if (RaySphereIntersection(zeus::CSphere(aabbPoint3, sphere.radius),
|
if (RaySphereIntersection(zeus::CSphere(aabbPoint3, sphere.radius),
|
||||||
|
|
2
nod
2
nod
|
@ -1 +1 @@
|
||||||
Subproject commit 2a472651ae9dcdce7e5b5c3a1e3d3769ab347e15
|
Subproject commit 6454d68abc2180a33aa4359c0ed3906519083c7e
|
Loading…
Reference in New Issue