Make all remote picture handlers use the same player offset #69
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.
This set of patches addresses inconsistencies in remote picture ID handling. Each commit addresses a separate issue, but they both depend on a helper method introduced in this PR.
Inconsistent player offsets in packet handlers
Current state:
Game_Multiplayerpacket handlers have a hardcoded offset of 50, butGame_Pictures::EraseAllMultiplayeruses the offset determined by the target RPG_RT version instead, which can be higher or lower than the assumed 50. All games assumed to use the official English RPG_RT have an offset of 1000.The patch prevents other players' pictures from potentially not being cleaned up when they disconnect.
Sample reproduction steps for Muma|Rope 33.3, a game with the default upper limit of 1000 pictures according to the current version of ynoengine:
Result: player B sees an extra sprite (dancing picture) even though they're the only person in the room.

This process can be easily repeated if player A gets assigned a different ID when they reconnect:
Relaxed save picture offset
This was introduced in 44af062, but the issue it was intended to fix (non-remote pictures not getting saved) seems to have been caused by something else, possibly the uninitialized idx variable from 595bbd2. On current
masterit is still possible to get remote pictures in if the player ID is sufficiently low; this 2kki save file has a sheep from player 0 at index 51 (it doesn't actually show on screen when loaded though).I have tested this with all affected games mentioned in #38 except for CU; this change does not break the overlays mentioned there.