Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pokemon Emerald: Temporary fix for missing items #3162

Merged
merged 3 commits into from
Apr 21, 2024

Conversation

Zunawe
Copy link
Collaborator

@Zunawe Zunawe commented Apr 16, 2024

What is this fixing or adding?

Adds a delay to the client's game watcher loop if the client has to update its item handling. If the response from the server that includes a player's own items doesn't come before the watcher starts giving the player items, they may be receiving the wrong items and some of the items they should have received may be skipped.

Bug is more likely to occur in the middle of an async when the player reconnects after many items have been found, and is more likely to skip items if there are many players, since the Emerald player is unlikely to find items for themselves.

The actual fix is to add the information into the patch file and read it before sending the first Connect, but I don't have a place for it yet. That change will be made when the patch is next updated.

How was this tested?

Opened a patch using remote_items with the client and received a few items. Wasn't able to reproduce the issue, but this fix is only adding a safety buffer to avoid a race condition anyway.

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Apr 16, 2024
@Zunawe Zunawe added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Apr 16, 2024
@Berserker66 Berserker66 added waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Apr 18, 2024
@Zunawe Zunawe added waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. and removed waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. labels Apr 18, 2024
@ThePhar ThePhar merged commit 5d8aca1 into ArchipelagoMW:main Apr 21, 2024
16 checks passed
@Zunawe Zunawe deleted the emerald-item-handling-fix branch May 23, 2024 08:44
qwint pushed a commit to qwint/Archipelago that referenced this pull request Jun 24, 2024
AustinSumigray pushed a commit to AustinSumigray/Archipelago that referenced this pull request Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants