mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Additional check for 0 bullets in DecreaseWeapon proc #56
This commit is contained in:
BIN
Binary file not shown.
@@ -2372,12 +2372,14 @@ RangesChecked
|
|||||||
; decreases 1 bullet from a weapon(A) of tank(TankNr)
|
; decreases 1 bullet from a weapon(A) of tank(TankNr)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr HowManyBullets
|
jsr HowManyBullets
|
||||||
|
beq noBullets ; no bullets - no decreasing (additional check)
|
||||||
cpy #0
|
cpy #0
|
||||||
beq defaultWeapon ; no decreasing Baby Missile
|
beq defaultWeapon ; no decreasing Baby Missile
|
||||||
sec
|
sec
|
||||||
sbc #1
|
sbc #1
|
||||||
sta (weaponPointer),y ; we have good values after HowManyBullets
|
sta (weaponPointer),y ; we have good values after HowManyBullets
|
||||||
defaultWeapon
|
defaultWeapon
|
||||||
|
noBullets
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user