mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Fix CheckOnWater while on a space tile (#34) [bugfix to aa91909388
]
This commit is contained in:
parent
0df29e5aaf
commit
9198f4d4b1
@ -93,12 +93,11 @@ SkipUpdateMapSprites:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
CheckUpdatePlayerSprite:
|
CheckUpdatePlayerSprite:
|
||||||
nop
|
call .CheckForcedBiking
|
||||||
call .CheckBiking
|
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
call .CheckSurfing
|
call .CheckSurfing
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
call .CheckSurfing2
|
call .ResetSurfingOrBikingState
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -106,7 +105,7 @@ CheckUpdatePlayerSprite:
|
|||||||
call UpdatePlayerSprite
|
call UpdatePlayerSprite
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.CheckBiking:
|
.CheckForcedBiking:
|
||||||
and a
|
and a
|
||||||
ld hl, wBikeFlags
|
ld hl, wBikeFlags
|
||||||
bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl]
|
bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl]
|
||||||
@ -116,7 +115,7 @@ CheckUpdatePlayerSprite:
|
|||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.CheckSurfing2:
|
.ResetSurfingOrBikingState:
|
||||||
ld a, [wPlayerState]
|
ld a, [wPlayerState]
|
||||||
cp PLAYER_NORMAL
|
cp PLAYER_NORMAL
|
||||||
jr z, .nope
|
jr z, .nope
|
||||||
|
@ -78,13 +78,25 @@ GetPlayerTile::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
CheckOnWater::
|
CheckOnWater::
|
||||||
|
; return z if on water, nz otherwise.
|
||||||
|
; if tile permission is SPACE_TILE, wPlayerState dictates whether player is on water or not.
|
||||||
|
; otherwise the current tile permission being LAND_TILE or WATER_TILE dictates it.
|
||||||
ld a, [wPlayerTile]
|
ld a, [wPlayerTile]
|
||||||
call GetTileCollision
|
call GetTileCollision
|
||||||
|
cp SPACE_TILE
|
||||||
|
jr z, .check_player_state
|
||||||
sub WATER_TILE
|
sub WATER_TILE
|
||||||
ret z
|
ret z
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
.check_player_state
|
||||||
|
ld a, [wPlayerState]
|
||||||
|
cp PLAYER_SURF
|
||||||
|
ret z
|
||||||
|
cp PLAYER_SURF_PIKA
|
||||||
|
ret
|
||||||
|
|
||||||
GetTileCollision::
|
GetTileCollision::
|
||||||
; Get the collision type of tile a.
|
; Get the collision type of tile a.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user