mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 22:27:43 +00:00
Finish CSpacePirate implementation
This commit is contained in:
@@ -59,4 +59,15 @@ void CPathFindSearch::GetSplinePointWithLookahead(zeus::CVector3f& pOut, const z
|
||||
GetSplinePointWithLookahead(pOut, p1, xc8_curWaypoint, lookahead);
|
||||
}
|
||||
|
||||
float CPathFindSearch::RemainingPathDistance(const zeus::CVector3f& pos) const {
|
||||
float f31 = 0.f;
|
||||
if (xc8_curWaypoint < x4_waypoints.size() - 1) {
|
||||
f31 += (x4_waypoints[xc8_curWaypoint + 1] - pos).magnitude();
|
||||
for (int i = xc8_curWaypoint + 1; i < x4_waypoints.size() - 1; ++i) {
|
||||
f31 += (x4_waypoints[i + 1] - x4_waypoints[i]).magnitude();
|
||||
}
|
||||
}
|
||||
return f31;
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
Reference in New Issue
Block a user