From b5efccd7ae65e9ddeeecd7f003da79494b6fd52b Mon Sep 17 00:00:00 2001 From: sunsetbear Date: Tue, 5 Jul 2022 23:23:06 -0400 Subject: [PATCH] zip crash fix --- scripts/characterStepEvent.gml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/characterStepEvent.gml b/scripts/characterStepEvent.gml index 81c9562..ed84821 100644 --- a/scripts/characterStepEvent.gml +++ b/scripts/characterStepEvent.gml @@ -288,9 +288,14 @@ if (platformCharacterIs(IN_AIR)) { } } // if (kRight > 0 && kJump == 1 && kJumpPushedSteps == 0 && position_meeting(x - 8, y - 16, oSolid) == true) } // if (state == JUMPING && statetime > 4 && position_meeting(x, y + 8, oSolid) == false && ...) + //below is zip code if (walljumping) { - if (facing == LEFT) while (isCollisionRight(1) == 0) x += 1; - if (facing == RIGHT) while (isCollisionLeft(1) == 0) x -= 1; + if (facing == LEFT) while (isCollisionRight(1) == 0) && collision_line(x, y, (x +4000), y, oSolid, false, false) { + x += 1; + } + if (facing == RIGHT) while (isCollisionLeft(1) == 0) && collision_line(x, y, (x -4000), y, oSolid, false, false) { + x -= 1; + } } if (kJump && kJumpPushedSteps == 0 && vjump == 1 && aimdirection != 6 && aimdirection != 7 && novjump == 0 && state != AIRBALL && aimlock == 0 && monster_drain == 0) { vjump = 0;