ootw: collision: properly check to see if alien on same level

This commit is contained in:
Vince Weaver 2019-08-22 10:51:37 -04:00
parent 4174221b4e
commit c1af283391

View File

@ -257,8 +257,12 @@ calc_gun_right_alien_loop:
cmp WHICH_ROOM
bne calc_gun_right_alien_continue
lda PHYSICIST_X
; only if on same level
lda alien_y,X
cmp PHYSICIST_Y
bne calc_gun_right_alien_continue
lda PHYSICIST_X
cmp alien_x,X
bcs calc_gun_right_alien_continue ; bge
@ -466,8 +470,12 @@ calc_gun_left_alien_loop:
cmp WHICH_ROOM
bne calc_gun_left_alien_continue
lda PHYSICIST_X
; only if on same level
lda alien_y,X
cmp PHYSICIST_Y
bne calc_gun_left_alien_continue
lda PHYSICIST_X
cmp alien_x,X
bcc calc_gun_left_alien_continue ; blt