Reimplement multiplayer command ownership and document network flow - #220
Open
Krarilotus wants to merge 3 commits into
Open
Reimplement multiplayer command ownership and document network flow#220Krarilotus wants to merge 3 commits into
Krarilotus wants to merge 3 commits into
Conversation
Contributor
Author
|
Added native system-message evidence to the linked network-flow note in 8a9c79d. The player-removal branch calls the identity translator at Crusader 0x490755, then immediately calls removePlayerFromLobby at 0x49075B without reloading ECX: another concrete caller for the receiver-preservation requirement in this implementation. The note also distinguishes host timing/hash resets from timed-command dispatch and records the system type constants against the SDK header. This update changes documentation only; the C++ implementation and its previously reported 6,156 differential comparisons are unchanged. The larger receive routine is analyzed, not claimed newly reimplemented. |
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.
TL;DR: Reimplements how the game translates a multiplayer sender into the player who owns a command. Documents the native paths for timed commands, immediate commands and synchronization.
Adds
GameSynchronyState::translateMultiplayerIDsIntoPlayerIDsat Crusader0x47EAF0in readable C++03 using the existing receiver layout. Single-player modes ignore the supplied handle; multiplayer scans slots 1–8 and keeps the last match, including duplicates and sentinels. Slot 0 is excluded. The implementation preserves the ECX receiver used by native callers.Validation: MSVC 2005 SP1
/O2compilation, formatter and diff checks pass. 3,078 native/C++ differential cases per executable (6,156 total) pass with memory bounds, no state writes, relocated receivers, ECX/callee-saved registers and thiscall stack cleanup checked. The checker validates original executable hashes; Extreme's corresponding routine is0x47ECC0and its local-slot offset differs. Reproduction instructions are intools/reimplementation-tests/PLAYER-IDENTITY.md.The compiled function is 137 bytes, the same size as the native routine, but its single-player return block is placed differently. This is not an exact-byte or 100% reccmp claim. A fresh full RelWithDebInfo
OpenSHC.dllbuild passes, with linked reccmp at 85.29%; the soft status entry records that score. A current Windows SDK manifest tool is used locally. No DLL deployment or live multiplayer test was performed. Generated headers, resolver activation and default source selection are unchanged.The linked wiki note records native command timing/ownership, the 24-bit wire timestamp, immediate dispatch outside the timed queue, host/roster transitions and chunked state resynchronization. Those larger routines were analyzed, not newly reimplemented here. The implementation covers the identity translator; the other routines are documented analysis.