Update Crossed OW to only perform Link/Bunny state changes when world changes

This commit is contained in:
codemann8
2021-08-26 00:51:41 -05:00
parent fe24f6f865
commit 5d6d509bd9

View File

@@ -339,25 +339,26 @@ OWNewDestination:
; crossed OW shuffle
LDA.l OWMode+1 : AND.b #!FLAG_OW_CROSSED : beq .return
ldx $05 : lda.l OWTileWorldAssoc,x : cmp.l $7ef3ca : beq +
ldx $05 : lda.l OWTileWorldAssoc,x : cmp.l $7ef3ca : beq .return
sta.l $7ef3ca ; change world
lda #$38 : sta $012f ; play sfx - #$3b is an alternative
; toggle bunny mode
lda.l InvertedMode : bne .inverted
lda $7ef3ca : and.b #$40 : bra +
.inverted lda $7ef3ca : and.b #$40 : eor #$40
+ cmp #$40 : bne .nobunny
; turn into bunny
lda $5d : cmp #$04 : beq + ; if swimming, continue
lda #$17 : sta $5d
+ lda #$01 : sta $02e0 : sta $56
bra .return
; toggle bunny mode
+ lda $7ef357 : bne .nobunny
lda.l InvertedMode : bne .inverted
lda $7ef3ca : and.b #$40 : bra +
.inverted lda $7ef3ca : and.b #$40 : eor #$40
+ cmp #$40 : bne .nobunny
; turn into bunny
lda $5d : cmp #$04 : beq + ; if swimming, continue
lda #$17 : sta $5d
+ lda #$01 : sta $02e0 : sta $56
bra .return
.nobunny
lda $5d : cmp #$17 : bne + ; retain current state unless bunny
stz $5d
+ stz $02e0 : stz $56
.nobunny
lda $5d : cmp #$17 : bne + ; retain current state unless bunny
stz $5d
+ stz $02e0 : stz $56
.return
lda $05 : sta $8a