aboutsummaryrefslogtreecommitdiff
path: root/entity
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-02-28 16:18:56 +0900
committerAstatin <[email protected]>2025-02-28 16:18:56 +0900
commitafc683fd953bee5b7c9bed2439492cc7c1f87a49 (patch)
tree1c32128b51ca7cabed22f6d582a6d21cd4bcb7f3 /entity
parent398c9d42b691bc633d22dff85bc2ac29ed635efa (diff)
Fix entity corruption on spawn entity right after entity cancel from collision in dungeon init
Diffstat (limited to 'entity')
-rw-r--r--entity/bunny.gbasm1
-rw-r--r--entity/init.gbasm3
2 files changed, 3 insertions, 1 deletions
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