From 3649b73eca599701db818dbbf470b1b17e660083 Mon Sep 17 00:00:00 2001 From: Astatin Date: Fri, 7 Mar 2025 15:01:07 +0900 Subject: Fix walk on deleted objects + fix out of vblank on dialogue close and object draw --- entity/actions.gbasm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'entity/actions.gbasm') diff --git a/entity/actions.gbasm b/entity/actions.gbasm index 11951e6..7032766 100644 --- a/entity/actions.gbasm +++ b/entity/actions.gbasm @@ -81,6 +81,16 @@ Update_Animation_Steps: .update_mode: + ; We need to make sure that the mode doesn't change to a mode with objects update while a dialogue box refresh is currently being done + LD A, $mem_current_mode + BIT 7, A + JR Z, =.set_current_mode + LD A, $mem_display_flag + AND 0b00010100 + CP $00 + JR NZ, =.end + + .set_current_mode: LD A, $mem_requested_mode LD $mem_current_mode, A -- cgit v1.2.3-70-g09d2