Skip to content

Commit

Permalink
Fix inaccurate comment in UpdateNPCSprite
Browse files Browse the repository at this point in the history
Fixes #404
  • Loading branch information
Rangi42 committed Nov 22, 2023
1 parent 0a616ae commit 41ec74e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/overworld/movement.asm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ UpdateNPCSprite:
and a
jp z, InitializeSpriteStatus
call CheckSpriteAvailability
ret c ; if sprite is invisible, on tile >=MAP_TILESET_SIZE, in grass or player is currently walking
ret c ; don't do anything if sprite is invisible
ld h, HIGH(wSpriteStateData1)
ldh a, [hCurrentSpriteOffset]
ld l, a
Expand All @@ -148,7 +148,7 @@ UpdateNPCSprite:
jp z, UpdateSpriteInWalkingAnimation ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] == 3
ld a, [wWalkCounter]
and a
ret nz ; don't do anything yet if player is currently moving (redundant, already tested in CheckSpriteAvailability)
ret nz ; don't do anything yet if player is currently moving
call InitializeSpriteScreenPosition
ld h, HIGH(wSpriteStateData2)
ldh a, [hCurrentSpriteOffset]
Expand Down

0 comments on commit 41ec74e

Please sign in to comment.