Fix collision sfx during surfing

This commit is contained in:
dannye 2019-04-21 15:27:10 -05:00
parent 735d5bd4c2
commit c52ab8fb90

View file

@ -1967,9 +1967,15 @@ CollisionCheckOnWater::
jr z, .stopSurfing ; stop surfing if the tile is passable
jr .loop
.collision
ld a, [wChannelSoundIDs + Ch4]
cp SFX_COLLISION ; check if collision sound is already playing
jr z, .setCarry
;ld a, [wChannelSoundIDs + Ch4]
;cp SFX_COLLISION ; check if collision sound is already playing
; curSFX is not cleared for some reason.
; ch5 on?
ld hl, wChannel5 + wChannel1Flags1 - wChannel1 ; + CHANNEL_FLAGS1
bit 0, [hl]
jr nz, .setCarry
ld a, SFX_COLLISION
call PlaySound ; play collision sound (if it's not already playing)
.setCarry