Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/SB/Core/x/xCollide.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,18 @@ U32 xSphereHitsSphere(const xSphere* a, const xSphere* b, xCollis* coll)
}
return uVar1;
}

void xParabolaRecenter(xParabola* p, F32 newZeroT)
{
xVec3 newPos;
xVec3 newVel;

xParabolaEvalPos(p, &newPos, newZeroT);
xParabolaEvalVel(p, &newVel, newZeroT);

xVec3Copy(&p->initPos, &newPos);
xVec3Copy(&p->initVel, &newVel);

p->maxTime -= newZeroT;
p->minTime -= newZeroT;
}
1 change: 1 addition & 0 deletions src/SB/Core/x/xCollide.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ U32 xSphereHitsModel(const xSphere* b, const xModelInstance* m, xCollis* coll);
S32 xParabolaHitsEnv(xParabola* p, const xEnv* env, xCollis* colls);
void xParabolaEvalPos(const xParabola*, xVec3*, F32);
void xParabolaEvalVel(const xParabola*, xVec3*, F32);
void xParabolaRecenter(xParabola* p, F32 newZeroT);

void xVec3AddScaled(xVec3*, const xVec3*, F32);
xVec3 xCollisTriHit(const xCollis::tri_data& tri, const xModelInstance& model);
Expand Down
1 change: 1 addition & 0 deletions src/SB/Core/x/xVec3Inlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ F32 xVec3Dist(const xVec3* a, const xVec3* b);
F32 xVec3Dist2(const xVec3* vecA, const xVec3* vecB);
F32 xVec3Length2(const xVec3* vec);
F32 xVec3LengthFast(F32 x, F32 y, F32 z);
F32 xVec3LengthFast(const xVec3* vec);
void xVec3AddScaled(xVec3* o, const xVec3* v, F32 s);

inline void xVec3SMulBy(xVec3* v, F32 s)
Expand Down
Loading