Fix false ledge grabs when fixCollisionBugs is on
This commit is contained in:
parent
91b6514d8a
commit
cc1ca691ad
|
@ -66,6 +66,9 @@ sRandomizeMode = true
|
||||||
gServerSettings.playerInteractions = PLAYER_INTERACTIONS_PVP
|
gServerSettings.playerInteractions = PLAYER_INTERACTIONS_PVP
|
||||||
gServerSettings.playerKnockbackStrength = 20
|
gServerSettings.playerKnockbackStrength = 20
|
||||||
|
|
||||||
|
-- use fixed collisions
|
||||||
|
gLevelValues.fixCollisionBugs = 1
|
||||||
|
|
||||||
function calculate_rankings()
|
function calculate_rankings()
|
||||||
local rankings = {}
|
local rankings = {}
|
||||||
for i = 0, (MAX_PLAYERS - 1) do
|
for i = 0, (MAX_PLAYERS - 1) do
|
||||||
|
|
|
@ -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[2] = nextPos[2] - wall->normal.z * 60.0f;
|
||||||
ledgePos[1] = find_floor(ledgePos[0], nextPos[1] + 160.0f, ledgePos[2], &ledgeFloor);
|
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) {
|
if (ledgePos[1] - nextPos[1] <= 100.0f) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue