diff --git a/mods/arena/main.lua b/mods/arena/main.lua index 7839614a..f6f6e760 100644 --- a/mods/arena/main.lua +++ b/mods/arena/main.lua @@ -66,6 +66,9 @@ sRandomizeMode = true gServerSettings.playerInteractions = PLAYER_INTERACTIONS_PVP gServerSettings.playerKnockbackStrength = 20 +-- use fixed collisions +gLevelValues.fixCollisionBugs = 1 + function calculate_rankings() local rankings = {} for i = 0, (MAX_PLAYERS - 1) do diff --git a/src/game/mario_step.c b/src/game/mario_step.c index 9daa54b5..9990e335 100644 --- a/src/game/mario_step.c +++ b/src/game/mario_step.c @@ -418,6 +418,13 @@ u32 check_ledge_grab(struct MarioState *m, struct Surface *wall, Vec3f intendedP ledgePos[2] = nextPos[2] - wall->normal.z * 60.0f; ledgePos[1] = find_floor(ledgePos[0], nextPos[1] + 160.0f, ledgePos[2], &ledgeFloor); + if (gLevelValues.fixCollisionBugs) { + // fix false ledge grabs + if (!ledgeFloor || ledgeFloor->normal.y < 0.90630779f) { + return FALSE; + } + } + if (ledgePos[1] - nextPos[1] <= 100.0f) { return FALSE; }