Bugfixes for duping/disappearing item and mutliworld crash

This commit is contained in:
aerinon
2023-09-13 14:28:18 -06:00
parent b831dd29a5
commit c0dff8e7c9
2 changed files with 4 additions and 3 deletions

View File

@@ -147,8 +147,8 @@ AddInventory:
PHA : PHX : PHY : PHP : PHB
PHK : PLB
LDA.b #$7E : STA.b Scrap0D
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .countDungeonChecks
LDA.l StatsLocked : BNE .done
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .countDungeonChecks
REP #$30
TYA : AND.w #$00FF : ASL : TAX
SEP #$20
@@ -216,6 +216,7 @@ RTS
DungeonIncrement:
; In: X - Receipt ID << 1
REP #$10
PHX
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .done
LDA.w InventoryTable_properties,X : BIT.b #$40 : BEQ +

View File

@@ -585,7 +585,7 @@ ShouldSpawnItem:
PHX
TAX : LDA.l BitFieldMasks, X : STA $00
PLX ; restore X again
LDA.w SprItemFlags, X : BIT.w #$0001 : BEQ +
LDA.w SprItemFlags, X : BIT.w #$0001 : BNE +
TYX : LDA.l SpriteDropData, X : BIT $00 : BEQ .notObtained
BRA .obtained
+ TYX : LDA.l RoomPotData, X : BIT $00 : BEQ .notObtained
@@ -597,7 +597,7 @@ ShouldSpawnItem:
RTL
MarkSRAMForItem:
LDA $048E : CMP.b #$87 : BNE + ; check for hera basement cage
LDA.b RoomIndex : CMP.b #$87 : BNE + ; check for hera basement cage
CPX #$0A : BNE + ; the hera basement key is always sprite 0x0A
LDA $A8 : AND.b #$03 : CMP.b #$02 : BNE +
LDA.w $0403 : ORA.w KeyRoomFlagMasks, Y : RTL