mirror of
https://github.com/zeldaret/ss
synced 2026-06-10 12:55:12 -04:00
ActorOnRail_Ext getPoint Inline return type change to mVec3_c* instead of Vec*
This commit is contained in:
@@ -151,8 +151,8 @@ public:
|
||||
mPath.getDirection(mSegmentIndex, mSegmentTime, result);
|
||||
}
|
||||
|
||||
const Vec *getPoint(s32 idx) const {
|
||||
return mPath.getPoint(idx);
|
||||
const mVec3_c *getPoint(s32 idx) const {
|
||||
return reinterpret_cast<const mVec3_c *>(mPath.getPoint(idx));
|
||||
}
|
||||
|
||||
bool checkFlag(u32 flags) const {
|
||||
|
||||
@@ -3047,7 +3047,7 @@ void dAcEKs_c::executeState_PathMove() {
|
||||
}
|
||||
field_0xDCA = mRail.getPath().getPointParam(idx, 0);
|
||||
if (checkPathPntParam(field_0xDCA)) {
|
||||
setStartingPosition(*(const mVec3_c *)mRail.getPath().getPoint(idx));
|
||||
setStartingPosition(*mRail.getPoint(idx));
|
||||
mStartingPos.y = getLineCrossYRange(getStartingPosition(), 300);
|
||||
changeState(StateID_ReturnToWait);
|
||||
return;
|
||||
@@ -3058,10 +3058,10 @@ void dAcEKs_c::executeState_PathMove() {
|
||||
}
|
||||
if (field_0xDC9 == 1) {
|
||||
field_0xDC9 = 2;
|
||||
mVec3_c pnt;
|
||||
const s32 pntIdx = mRail.getClosestXZPoint(mPosition);
|
||||
const Vec *pPnt = mRail.getPoint(pntIdx);
|
||||
pnt.copyFrom(pPnt);
|
||||
|
||||
mVec3_c pnt = *mRail.getPoint(pntIdx);
|
||||
|
||||
if (mRail.getPosition().squareDistanceToXZ(mPosition) > pnt.squareDistanceToXZ(mPosition)) {
|
||||
mRail.setSegment(pntIdx, 0.f);
|
||||
setStartingPosition(mRail.getPosition());
|
||||
|
||||
@@ -610,8 +610,7 @@ s32 ActorOnRail_Ext::getClosestXZPoint(const mVec3_c &pos) const {
|
||||
s32 best = 0;
|
||||
mVec3_c c;
|
||||
for (s32 i = 0; i < mPath.getNumPoints(); i++) {
|
||||
const Vec *point = mPath.getPoint(i);
|
||||
c = *reinterpret_cast<const mVec3_c *>(point) - pos;
|
||||
c = *getPoint(i) - pos;
|
||||
f32 dist = c.squareMagXZ();
|
||||
if (max > dist) {
|
||||
best = i;
|
||||
|
||||
Reference in New Issue
Block a user