Skip to content

Commit 82dad9a

Browse files
committed
Prevent jumping ledge onto a cut tree on route 9
1 parent b1ff27a commit 82dad9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎engine/overworld/ledges.asm‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ HandleLedges::
3636
inc hl
3737
jr .loop
3838
.foundMatch
39+
ld a, [wSpritePlayerStateData1FacingDirection]
40+
cp SPRITE_FACING_DOWN
41+
jr z, .checkCutTileInFrontOfLedge
42+
.noCutTile
3943
ldh a, [hJoyHeld]
4044
and e
4145
ret z
@@ -53,6 +57,11 @@ HandleLedges::
5357
ld a, SFX_LEDGE
5458
rst _PlaySound
5559
ret
60+
.checkCutTileInFrontOfLedge
61+
lda_coord 8, 13
62+
cp $3D ; cut tile
63+
ret z
64+
jr .noCutTile
5665

5766
INCLUDE "data/tilesets/ledge_tiles.asm"
5867

0 commit comments

Comments
 (0)