mirror of
https://github.com/blondie7575/GSCats.git
synced 2025-04-07 19:37:06 +00:00
Fixed inventory deductions on player 1
This commit is contained in:
parent
1179aa7678
commit
3f607350fd
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
12
player.s
12
player.s
@ -172,6 +172,7 @@ playerDeltaPowerClampHigh:
|
||||
; playerFire
|
||||
;
|
||||
; Y = Player index
|
||||
; Trashes SCRATCHL
|
||||
;
|
||||
playerFire:
|
||||
SAVE_AX
|
||||
@ -182,11 +183,16 @@ playerFire:
|
||||
pha
|
||||
asl
|
||||
tax
|
||||
beq playerFire_infiniteAmmo
|
||||
lda playerData+PD_INVENTORY,x
|
||||
beq playerFire_infiniteAmmo ; Weapon 0 is always infinite
|
||||
stx SCRATCHL
|
||||
lda #playerData+PD_INVENTORY
|
||||
clc
|
||||
adc SCRATCHL
|
||||
sta SCRATCHL
|
||||
lda (SCRATCHL),y
|
||||
beq playerFire_abort
|
||||
dec ; Consume ammo
|
||||
sta playerData+PD_INVENTORY,x
|
||||
sta (SCRATCHL),y
|
||||
dec inventoryDirty
|
||||
|
||||
playerFire_infiniteAmmo:
|
||||
|
Loading…
x
Reference in New Issue
Block a user