mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-03 14:11:10 +00:00
Fix crash in check_ledge_grab
This commit is contained in:
parent
a0b3869711
commit
053773c06e
1 changed files with 2 additions and 0 deletions
|
@ -419,6 +419,8 @@ 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 (!ledgeFloor) { return FALSE; }
|
||||||
|
|
||||||
if (gLevelValues.fixCollisionBugs && gLevelValues.fixCollisionBugsFalseLedgeGrab) {
|
if (gLevelValues.fixCollisionBugs && gLevelValues.fixCollisionBugsFalseLedgeGrab) {
|
||||||
// fix false ledge grabs
|
// fix false ledge grabs
|
||||||
if (!ledgeFloor || ledgeFloor->normal.y < 0.90630779f) {
|
if (!ledgeFloor || ledgeFloor->normal.y < 0.90630779f) {
|
||||||
|
|
Loading…
Reference in a new issue