Revert "added hanging fix"

This reverts commit 041bc62f0c.
This commit is contained in:
Reonu
2021-06-30 22:26:21 +01:00
parent d09c7eb1a0
commit 7cc986f55e
2 changed files with 9 additions and 10 deletions

View File

@@ -70,8 +70,6 @@
#define NO_FALSE_LEDGEGRABS
// Allows Mario to jump kick on steep surfaces that are set to be non slippery, instead of being forced to dive
#define JUMP_KICK_FIX
// Allow Mario to grab hangable ceilings from any state
#define HANGING_FIX
// 46 degree walkicks
//#define WALLKICKS_46_DEGREES
// Disables fall damage

View File

@@ -9,6 +9,8 @@
#include "interaction.h"
#include "mario_step.h"
#include "config.h"
static s16 sMovingSandSpeeds[] = { 12, 8, 4, 0 };
struct Surface gWaterSurfacePseudoFloor = {
@@ -268,7 +270,7 @@ static s32 perform_ground_quarter_step(struct MarioState *m, Vec3f nextPos) {
upperWall = resolve_and_return_wall_collisions(nextPos, 60.0f, 50.0f);
floorHeight = find_floor(nextPos[0], nextPos[1], nextPos[2], &floor);
ceilHeight = vec3f_find_ceil(nextPos, floorHeight, &ceil);
ceilHeight = vec3f_find_ceil(nextPos, nextPos[1], &ceil);
waterLevel = find_water_level(nextPos[0], nextPos[2]);
@@ -402,11 +404,11 @@ s32 perform_air_quarter_step(struct MarioState *m, Vec3f intendedPos, u32 stepAr
lowerWall = resolve_and_return_wall_collisions(nextPos, 30.0f, 50.0f);
floorHeight = find_floor(nextPos[0], nextPos[1], nextPos[2], &floor);
ceilHeight = vec3f_find_ceil(nextPos, floorHeight, &ceil);
ceilHeight = vec3f_find_ceil(nextPos, nextPos[1], &ceil);
waterLevel = find_water_level(nextPos[0], nextPos[2]);
m->wall = NULL;
//m->wall = NULL;
//! The water pseudo floor is not referenced when your intended qstep is
// out of bounds, so it won't detect you as landing.
@@ -448,12 +450,8 @@ s32 perform_air_quarter_step(struct MarioState *m, Vec3f intendedPos, u32 stepAr
m->vel[1] = 0.0f;
//! Uses referenced ceiling instead of ceil (ceiling hang upwarp)
#ifdef HANGING_FIX
if (m->ceil != NULL && m->ceil->type == SURFACE_HANGABLE) {
#else
if ((stepArg & AIR_STEP_CHECK_HANG) && m->ceil != NULL
&& m->ceil->type == SURFACE_HANGABLE) {
#endif
return AIR_STEP_GRABBED_CEILING;
}
@@ -494,8 +492,11 @@ s32 perform_air_quarter_step(struct MarioState *m, Vec3f intendedPos, u32 stepAr
if (m->wall->type == SURFACE_BURNING) {
return AIR_STEP_HIT_LAVA_WALL;
}
#ifdef WALLKICKS_46_DEGREES
if (wallDYaw < -0x5F00 || wallDYaw > 0x5700) {
#else
if (wallDYaw < -0x6000 || wallDYaw > 0x6000) {
#endif
m->flags |= MARIO_UNKNOWN_30;
return AIR_STEP_HIT_WALL;
}