Skip to content

Refactor game_info packet handler#348

Merged
GooberRF merged 8 commits intomasterfrom
gi_refactor
Apr 12, 2026
Merged

Refactor game_info packet handler#348
GooberRF merged 8 commits intomasterfrom
gi_refactor

Conversation

@GooberRF
Copy link
Copy Markdown
Owner

@GooberRF GooberRF commented Apr 8, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors handling of game_info packets in the multiplayer/network layer, aiming to replace the stock handler with a bounds-checked parser and to simplify AF game_info extension (de)serialization.

Changes:

  • Replaced the stock process_game_info_packet handler with a new bounds-checked parser that updates the server browser via multi_join_game_add_server.
  • Changed AF game_info v2 extension from a packed POD struct to an in-memory struct with explicit serialize_to_wire() and updated client-side parsing accordingly.
  • Added an rf::multi_join_game_add_server engine import for updating server browser entries.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
game_patch/rf/multi.h Adds an address-import for multi_join_game_add_server so the new handler can update the server list.
game_patch/multi/network.h Refactors AF game_info v2 extension into an in-memory representation and declares wire serialization.
game_patch/multi/network.cpp Implements wire serialization, replaces the game_info packet handler, and updates server response tail building.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GooberRF GooberRF marked this pull request as ready for review April 12, 2026 15:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

game_patch/multi/network.cpp:1316

  • The game_info v2 AF extension wire format was changed (footer removed, ext_size/ext_version removed), but the request capability version is still gi_req_ext_ver = 3. This will break interoperability with existing clients/servers that already use ver=3 but still expect the footer-based format. Consider bumping the request version (e.g., send/parse new format only for ver>=4) and keep emitting/parsing the existing ver=3 footer-based format for compatibility (and future extensibility).
        if (req_ver >= 3) {
            // v2 extension for modern AF clients
            af_game_info_ext_v2 ext{};
            ext.set_flags(g_game_info_server_flags);

            // count players by type
            uint8_t num_bots = 0;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GooberRF GooberRF merged commit 94c9be3 into master Apr 12, 2026
4 checks passed
@GooberRF GooberRF deleted the gi_refactor branch April 12, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants