diff options
Diffstat (limited to 'src/toBeSorted/d_path.cpp')
| -rw-r--r-- | src/toBeSorted/d_path.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/toBeSorted/d_path.cpp b/src/toBeSorted/d_path.cpp index 43b2b896..6a539796 100644 --- a/src/toBeSorted/d_path.cpp +++ b/src/toBeSorted/d_path.cpp @@ -589,6 +589,22 @@ s32 ActorOnRail_Ext::getNextPointIndex() const { return getNextPointIndex(mSegmentIndex); } +s32 ActorOnRail_Ext::getNextPointIndex2() const { + if (mSpeed >= 0.0f) { + return mSegmentIndex; + } + + if (mSegmentIndex + 1 < mPath.getNumPoints()) { + return mSegmentIndex + 1; + } + + if (mPath.isWrapping()) { + return 0; + } + + return mPath.getLastPointIdx(); +} + s32 ActorOnRail_Ext::getClosestXZPoint(const mVec3_c &pos) const { f32 max = EGG::Math<f32>::maxNumber(); s32 best = 0; |
