Skip to content

Commit e699a3d

Browse files
Merge pull request ShiraTheMogul#39 from jojo-kep/master
attempt to band-aide missable objects not hiding properly
2 parents bd0618c + 6cb0f62 commit e699a3d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎engine/overworld/missable_objects.asm‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,21 @@ HideObject:
142142
ld c, a
143143
ld b, FLAG_SET
144144
call MissableObjectFlagAction ; set "removed" flag
145+
call VerifyObjectState
146+
jr z, HideObject
145147
jp UpdateSprites
146148

149+
;returns z flag set if shown and z flag cleared if hidden
150+
VerifyObjectState:
151+
ld hl, wMissableObjectFlags
152+
ld a, [wMissableObjectIndex]
153+
ld c, a
154+
ld b, FLAG_TEST
155+
call MissableObjectFlagAction
156+
ld a, c
157+
and a
158+
ret
159+
147160
MissableObjectFlagAction:
148161
; identical to FlagAction
149162

0 commit comments

Comments
 (0)