Skip to content

[PR](Player info): Fixed player info sending where player info were not sent compared to previous versions#270

Merged
ctalneau merged 1 commit into
mainfrom
command-bug-fixes
Jun 28, 2025
Merged

[PR](Player info): Fixed player info sending where player info were not sent compared to previous versions#270
ctalneau merged 1 commit into
mainfrom
command-bug-fixes

Conversation

@ctalneau

Copy link
Copy Markdown
Collaborator

This pull request enhances the behavior of the send_all_player_info_to_one_client function in the command_pnw.c file by ensuring additional player information is sent to a client. Specifically, it introduces new commands to provide more comprehensive details about each player.

Enhancements to player information transmission:

  • src/Server/graphical_command/command_pnw.c: Added calls to send_pin_command and send_plv_command alongside the existing send_pnw_command within the send_all_player_info_to_one_client function. These additions ensure that position and level information for AI players who are fully connected are also sent to the recipient client.

@ctalneau ctalneau self-assigned this Jun 28, 2025
@ctalneau ctalneau added bug Unexpected behavior or malfunction server Code and issues related to the C-based game server labels Jun 28, 2025
@ctalneau ctalneau changed the title [FIX](Player info): Fixed player info sending where player info were not sent compared to previous versions [PR](Player info): Fixed player info sending where player info were not sent compared to previous versions Jun 28, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that, in addition to the existing PNW command, each fully connected AI player’s position (PIN) and level (PLV) are also sent to a client.

  • Added send_pin_command and send_plv_command calls alongside send_pnw_command in send_all_player_info_to_one_client.
  • Introduced braces around the if block to accommodate multiple statements.
Comments suppressed due to low confidence (2)

src/Server/graphical_command/command_pnw.c:72

  • Update the function’s doc comment to mention that send_pin_command and send_plv_command are now invoked for each fully connected AI player.
void send_all_player_info_to_one_client(game_t *game, zappy_client_t *clients,

src/Server/graphical_command/command_pnw.c:85

  • Add or extend unit/integration tests to verify that send_pin_command and send_plv_command are called when is_fully_connected is true.
            send_pin_command(game, clients, current, recipient);

Comment thread src/Server/graphical_command/command_pnw.c
@ctalneau ctalneau merged commit 3270016 into main Jun 28, 2025
10 checks passed
@ctalneau ctalneau deleted the command-bug-fixes branch June 28, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or malfunction server Code and issues related to the C-based game server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants