diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm index 8f88b138..d232780d 100644 --- a/engine/overworld/missable_objects.asm +++ b/engine/overworld/missable_objects.asm @@ -142,8 +142,21 @@ HideObject: ld c, a ld b, FLAG_SET call MissableObjectFlagAction ; set "removed" flag + call VerifyObjectState + jr z, HideObject jp UpdateSprites +;returns z flag set if shown and z flag cleared if hidden +VerifyObjectState: + ld hl, wMissableObjectFlags + ld a, [wMissableObjectIndex] + ld c, a + ld b, FLAG_TEST + call MissableObjectFlagAction + ld a, c + and a + ret + MissableObjectFlagAction: ; identical to FlagAction