actor: fixed actor -> actor collision
authorLukas Krickl <lukas@krickl.dev>
Wed, 4 Feb 2026 04:40:19 +0000 (05:40 +0100)
committerLukas Krickl <lukas@krickl.dev>
Wed, 4 Feb 2026 04:40:19 +0000 (05:40 +0100)
The stack here was messed up due to an incorrect jump.
It is surprising this did not crash :^)

src/actor.s

index fe57087e4197e7810c2b52937c5f5663529fc2a0..efe03c17577969f4fd7c42123abf9952812e341d 100644 (file)
@@ -376,6 +376,7 @@ act_set_tact:
        call map_get_tile
        ; get tile
 
+
        ld bc, t_act
        add hl, bc
 
@@ -478,7 +479,7 @@ act_move_to:
        ; if not NULL do not move
        ld a, [hl+]
        or a, [hl]
-       jp nz, @hit
+       jp nz, @act_hit
 
 
        pop bc
@@ -501,6 +502,7 @@ act_move_to:
 @hit:
        ; clean up stack
        pop de
+@act_hit:
        pop de 
        pop de