From afc683fd953bee5b7c9bed2439492cc7c1f87a49 Mon Sep 17 00:00:00 2001 From: Astatin Date: Fri, 28 Feb 2025 16:18:56 +0900 Subject: Fix entity corruption on spawn entity right after entity cancel from collision in dungeon init --- entity/bunny.gbasm | 1 + entity/init.gbasm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'entity') diff --git a/entity/bunny.gbasm b/entity/bunny.gbasm index d2b9148..084cf59 100644 --- a/entity/bunny.gbasm +++ b/entity/bunny.gbasm @@ -283,6 +283,7 @@ Move_Bunny: BIT 3, A JR Z, =.Middle_movement_doublespeed_viewport_update.end LD A, E + LD $dbg_var, A CP $02 JR NZ, =.Middle_movement_doublespeed_viewport_update.end diff --git a/entity/init.gbasm b/entity/init.gbasm index d035820..76c96b4 100644 --- a/entity/init.gbasm +++ b/entity/init.gbasm @@ -202,7 +202,8 @@ Initialize_Enemy: ; HL => pointer to entity struct XOR A LD (HL-), A LD (HL-), A - LD (HL-), A + LD (HL), A + POP BC RET -- cgit v1.2.3-70-g09d2