summaryrefslogtreecommitdiff
path: root/src/toBeSorted
diff options
context:
space:
mode:
authorelijah-thomas774 <elijahthomas774@gmail.com>2026-05-24 14:29:43 -0400
committerelijah-thomas774 <elijahthomas774@gmail.com>2026-05-24 20:34:43 -0400
commit0b6f97ed73be491908b754ecfb2c231abc61d613 (patch)
tree274dd1f765998a1379604ef368725ad457c26766 /src/toBeSorted
parentf65d59d315ff007b2cc9940be54cf0843f1ebcf7 (diff)
dAcEKs_c State ChaseAttack, Fighting, AttackReady, Attack, Damage, Stun, WindBlow and PathMove
Diffstat (limited to 'src/toBeSorted')
-rw-r--r--src/toBeSorted/d_path.cpp16
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;