From 061de66397845ef89ccb6b2ecd748d164ccff0b2 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 9 Jan 2022 23:15:41 +0100 Subject: [PATCH] MultiServer: don't mark a slot as having Activity if a location check was done through Collect --- MultiServer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index f92077ad74..128451215e 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -639,7 +639,7 @@ def collect_player(ctx: Context, team: int, slot: int): ctx.notify_all("%s (Team #%d) has collected" % (ctx.player_names[(team, slot)], team + 1)) for source_player, location_ids in all_locations.items(): - register_location_checks(ctx, team, source_player, location_ids) + register_location_checks(ctx, team, source_player, location_ids, count_activity=False) update_checked_locations(ctx, team, source_player) @@ -651,11 +651,13 @@ def get_remaining(ctx: Context, team: int, slot: int) -> typing.List[int]: return sorted(items) -def register_location_checks(ctx: Context, team: int, slot: int, locations: typing.Iterable[int]): +def register_location_checks(ctx: Context, team: int, slot: int, locations: typing.Iterable[int], + count_activity: bool = True): new_locations = set(locations) - ctx.location_checks[team, slot] new_locations.intersection_update(ctx.locations[slot]) # ignore location IDs unknown to this multidata if new_locations: - ctx.client_activity_timers[team, slot] = datetime.datetime.now(datetime.timezone.utc) + if count_activity: + ctx.client_activity_timers[team, slot] = datetime.datetime.now(datetime.timezone.utc) for location in new_locations: item_id, target_player = ctx.locations[slot][location] new_item = NetworkItem(item_id, location, slot)