LADX: Fix crash in item pick up with > 100 players (#1658)
This commit is contained in:
parent
5f447f4e6b
commit
5ed56db48a
|
@ -259,9 +259,9 @@ def generateRom(args, settings, ap_settings, auth, seed_name, logic, rnd=None, m
|
||||||
mw = None
|
mw = None
|
||||||
if spot.item_owner != spot.location_owner:
|
if spot.item_owner != spot.location_owner:
|
||||||
mw = spot.item_owner
|
mw = spot.item_owner
|
||||||
if mw > 255:
|
if mw > 100:
|
||||||
# Don't torture the game with higher slot numbers
|
# There are only 101 player name slots (99 + "The Server" + "another world"), so don't use more than that
|
||||||
mw = 255
|
mw = 100
|
||||||
spot.patch(rom, spot.item, multiworld=mw)
|
spot.patch(rom, spot.item, multiworld=mw)
|
||||||
patches.enemies.changeBosses(rom, world_setup.boss_mapping)
|
patches.enemies.changeBosses(rom, world_setup.boss_mapping)
|
||||||
patches.enemies.changeMiniBosses(rom, world_setup.miniboss_mapping)
|
patches.enemies.changeMiniBosses(rom, world_setup.miniboss_mapping)
|
||||||
|
|
|
@ -67,7 +67,12 @@ MessageAddFromPlayerOld:
|
||||||
|
|
||||||
; hahaha none of this follows calling conventions
|
; hahaha none of this follows calling conventions
|
||||||
MessageAddPlayerName:
|
MessageAddPlayerName:
|
||||||
; call MessagePad
|
; call MessagePad
|
||||||
|
|
||||||
|
cp 101
|
||||||
|
jr C, .continue
|
||||||
|
ld a, 100
|
||||||
|
.continue:
|
||||||
ld h, 0 ; bc = a, hl = a
|
ld h, 0 ; bc = a, hl = a
|
||||||
ld l, a
|
ld l, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
|
@ -79,6 +84,7 @@ MessageAddPlayerName:
|
||||||
add hl, bc ; 17
|
add hl, bc ; 17
|
||||||
ld bc, MultiNamePointers
|
ld bc, MultiNamePointers
|
||||||
add hl, bc ; hl = MultiNamePointers + wLinkGiveItemFrom * 17
|
add hl, bc ; hl = MultiNamePointers + wLinkGiveItemFrom * 17
|
||||||
|
|
||||||
call MessageCopyString
|
call MessageCopyString
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue