diff options
Diffstat (limited to 'src/code/z_path.c')
| -rw-r--r-- | src/code/z_path.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/code/z_path.c b/src/code/z_path.c index d1d81286d..03dc6d6f6 100644 --- a/src/code/z_path.c +++ b/src/code/z_path.c @@ -33,4 +33,14 @@ f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw) { return SQ(dx) + SQ(dz); } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_CopyLastPoint.s") +void Path_CopyLastPoint(Path* path, Vec3f* dest) { + Vec3s* pointPos; + + if (path != NULL) { + pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[path->count - 1]; + + dest->x = pointPos->x; + dest->y = pointPos->y; + dest->z = pointPos->z; + } +} |
