Fixed moving towards water downslopes

This commit is contained in:
thecozies
2021-04-27 06:25:07 -05:00
parent 52c8acdf5e
commit ab42e08688

View File

@@ -1497,8 +1497,12 @@ static s32 act_hold_metal_water_fall_land(struct MarioState *m) {
static s32 check_common_submerged_cancels(struct MarioState *m) {
if (m->pos[1] > m->waterLevel - 80) {
if (m->waterLevel - 80 > m->floorHeight) {
// m->pos[1] = m->waterLevel - 80; //! BUG: Downwarp swimming out of waterfalls
return transition_submerged_to_airborne(m);
if (m->pos[1] - (m->waterLevel - 80) < 50) {
m->pos[1] = m->waterLevel - 80; // lock mario to top if the falloff isn't big enough
} else {
// m->pos[1] = m->waterLevel - 80; //! BUG: Downwarp swimming out of waterfalls
return transition_submerged_to_airborne(m);
}
} else {
//! If you press B to throw the shell, there is a ~5 frame window
// where your held object is the shell, but you are not in the