From 6e25af94939ddd8d06c4baf357544a7f273d5691 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Thu, 21 Oct 2021 20:55:01 +0200 Subject: [PATCH] LttPClient: fix missed ROM_PLAYER_LIMIT --- LttPClient.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/LttPClient.py b/LttPClient.py index 3cb61a1d..5e060d9a 100644 --- a/LttPClient.py +++ b/LttPClient.py @@ -866,14 +866,19 @@ async def game_watcher(ctx: Context): color(ctx.item_name_getter(item.item), 'red', 'bold'), color(ctx.player_names[item.player], 'yellow'), ctx.location_name_getter(item.location), recv_index, len(ctx.items_received))) - snes_buffered_write(ctx, RECV_PROGRESS_ADDR, bytes([recv_index & 0xFF, (recv_index >> 8) & 0xFF])) - snes_buffered_write(ctx, RECV_ITEM_ADDR, bytes([item.item])) + snes_buffered_write(ctx, RECV_PROGRESS_ADDR, + bytes([recv_index & 0xFF, (recv_index >> 8) & 0xFF])) + snes_buffered_write(ctx, RECV_ITEM_ADDR, + bytes([item.item])) snes_buffered_write(ctx, RECV_ITEM_PLAYER_ADDR, bytes([min(ROM_PLAYER_LIMIT, item.player) if item.player != ctx.slot else 0])) if scout_location > 0 and scout_location in ctx.locations_info: - snes_buffered_write(ctx, SCOUTREPLY_LOCATION_ADDR, bytes([scout_location])) - snes_buffered_write(ctx, SCOUTREPLY_ITEM_ADDR, bytes([ctx.locations_info[scout_location][0]])) - snes_buffered_write(ctx, SCOUTREPLY_PLAYER_ADDR, bytes([ctx.locations_info[scout_location][1]])) + snes_buffered_write(ctx, SCOUTREPLY_LOCATION_ADDR, + bytes([scout_location])) + snes_buffered_write(ctx, SCOUTREPLY_ITEM_ADDR, + bytes([ctx.locations_info[scout_location][0]])) + snes_buffered_write(ctx, SCOUTREPLY_PLAYER_ADDR, + bytes([min(ROM_PLAYER_LIMIT, ctx.locations_info[scout_location][1])])) await snes_flush_writes(ctx)