You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Fix the stationary action and ledgegrab downwarps when pushed off a ledge, and added a special downwarp for grabbing Bowser (#664)
* fix stationary/ledge downwarp, special bowser case * Comment clarity Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> --------- Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
This commit is contained in:
@@ -418,6 +418,8 @@ u32 mario_check_object_grab(struct MarioState *m) {
|
||||
if (facingDYaw >= -0x5555 && facingDYaw <= 0x5555) {
|
||||
m->faceAngle[1] = m->interactObj->oMoveAngleYaw;
|
||||
m->usedObj = m->interactObj;
|
||||
m->pos[1] = m->floorHeight;
|
||||
m->vel[1] = 0.0f;
|
||||
result = set_mario_action(m, ACT_PICKING_UP_BOWSER, 0);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -242,8 +242,10 @@ void stop_and_set_height_to_floor(struct MarioState *m) {
|
||||
mario_set_forward_vel(m, 0.0f);
|
||||
m->vel[1] = 0.0f;
|
||||
|
||||
//! This is responsible for some downwarps.
|
||||
m->pos[1] = m->floorHeight;
|
||||
// HackerSM64 2.1: This check fixes the ledgegrab downwarp after being pushed off a ledge.
|
||||
if (m->pos[1] <= m->floorHeight + 160.0f) {
|
||||
m->pos[1] = m->floorHeight;
|
||||
}
|
||||
|
||||
vec3f_copy(marioObj->header.gfx.pos, m->pos);
|
||||
vec3s_set(marioObj->header.gfx.angle, 0, m->faceAngle[1], 0);
|
||||
@@ -259,9 +261,10 @@ s32 stationary_ground_step(struct MarioState *m) {
|
||||
if (takeStep) {
|
||||
stepResult = perform_ground_step(m);
|
||||
} else {
|
||||
//! TODO - This is responsible for many stationary downwarps but is
|
||||
// important for stuff like catching Bowser in midair, figure out a good way to fix
|
||||
m->pos[1] = m->floorHeight;
|
||||
// HackerSM64 2.1: This check prevents the downwarps that plagued stationary actions.
|
||||
if (m->pos[1] <= m->floorHeight + 160.0f) {
|
||||
m->pos[1] = m->floorHeight;
|
||||
}
|
||||
|
||||
vec3f_copy(marioObj->header.gfx.pos, m->pos);
|
||||
vec3s_set(marioObj->header.gfx.angle, 0, m->faceAngle[1], 0);
|
||||
|
||||
Reference in New Issue
Block a user