Skip to content
This repository was archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
reverted collision back to vanilla
Browse files Browse the repository at this point in the history
more accurate lag
  • Loading branch information
stalechilibeans committed Nov 28, 2024
1 parent 7d63fc7 commit ec06a56
Show file tree
Hide file tree
Showing 52 changed files with 664 additions and 500 deletions.
1 change: 0 additions & 1 deletion include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ struct Surface
} normal;
/*0x28*/ f32 originOffset;
/*0x2C*/ struct Object *object;
/*0x30*/ u8 padding[4];
};

struct MarioBodyState
Expand Down
2 changes: 1 addition & 1 deletion src/engine/behavior_script.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ static s32 bhv_cmd_drop_to_floor(void) {
f32 y = gCurrentObject->oPosY;
f32 z = gCurrentObject->oPosZ;

f32 floor = BGcheck(x, y + 200.0f, z);
f32 floor = find_floor_height(x, y + 200.0f, z);
gCurrentObject->oPosY = floor;
gCurrentObject->oMoveFlags |= OBJ_MOVE_ON_GROUND;

Expand Down
6 changes: 3 additions & 3 deletions src/engine/math_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,9 @@ void mtxf_align_terrain_triangle(Mat4 mtx, Vec3f pos, s16 yaw, f32 radius) {
point2[0] = pos[0] + radius * sins(yaw + 0xD555);
point2[2] = pos[2] + radius * coss(yaw + 0xD555);

point0[1] = mcBGGroundCheck(point0[0], pos[1] + 150, point0[2], &sp74);
point1[1] = mcBGGroundCheck(point1[0], pos[1] + 150, point1[2], &sp74);
point2[1] = mcBGGroundCheck(point2[0], pos[1] + 150, point2[2], &sp74);
point0[1] = find_floor(point0[0], pos[1] + 150, point0[2], &sp74);
point1[1] = find_floor(point1[0], pos[1] + 150, point1[2], &sp74);
point2[1] = find_floor(point2[0], pos[1] + 150, point2[2], &sp74);

if (point0[1] - pos[1] < minY) {
point0[1] = pos[1];
Expand Down
Loading

0 comments on commit ec06a56

Please sign in to comment.