From e4c68fde6061fd11e9139b8ae32a2fb11309418b Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Tue, 2 Jun 2020 07:38:23 -0700 Subject: [PATCH] Don't clear locally visited locations if rom is same as previous on /snes after /snes_close (#98) --- MultiClient.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MultiClient.py b/MultiClient.py index d50b8258..4449162a 100644 --- a/MultiClient.py +++ b/MultiClient.py @@ -58,6 +58,7 @@ class Context: self.locations_info = {} self.awaiting_rom = False self.rom = None + self.prev_rom = None self.auth = None self.found_items = found_items self.finished_game = False @@ -1005,8 +1006,11 @@ async def game_watcher(ctx : Context): continue ctx.rom = list(rom) - ctx.locations_checked = set() - ctx.locations_scouted = set() + if not ctx.prev_rom or ctx.prev_rom != ctx.rom: + ctx.locations_checked = set() + ctx.locations_scouted = set() + ctx.prev_rom = ctx.rom.copy() + if ctx.awaiting_rom: await server_auth(ctx, False)