Fix library cards showing as card backs for guest in multiplayer - #11585
Closed
shoeless wants to merge 1 commit into
Closed
Fix library cards showing as card backs for guest in multiplayer#11585shoeless wants to merge 1 commit into
shoeless wants to merge 1 commit into
Conversation
tool4ever
reviewed
Aug 10, 2026
| TrackableCollection<PlayerView> col = get(TrackableProperty.PlayerMayLook); | ||
| // TODO don't use contains as it only queries the backing HashSet which is problematic for netplay because of unsynchronized player ids | ||
| return col != null && col.indexOf(pv) != -1; | ||
| if (col == null) { return false; } |
CardView.mayPlayerLook checked the may-look PlayerView collection with indexOf/contains (reference equality). In network play the client's local PlayerViews are distinct objects from the deserialized server ones, so the lookup always missed and revealed cards (e.g. own library under Future Sight, opponent hand reveals) rendered as card backs for the guest. Compare by id instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shoeless
force-pushed
the
fix/mp-library-cardview-id-compare
branch
from
August 11, 2026 05:15
b783bcd to
8d36ea9
Compare
Contributor
Author
|
Confirmed — redundant on master, closing. One adjacent real find while verifying: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CardView.mayPlayerLooklooked up the may-lookPlayerViewcollection withindexOf(reference equality):In network play the client's local
PlayerViews are distinct objects from the deserialized server ones, so the lookup always missed. Cards a player should be able to see — their own revealed library top (Future Sight/Garruk's Horde), opponent-hand reveals, etc. — rendered as card backs for the guest.Fix
Compare by
getId()instead of object reference. Single file,forge-gameonly.🤖 Generated with Claude Code