[PR](Player info): Fixed player info sending where player info were not sent compared to previous versions#270
Merged
Merged
Conversation
… not sent compared to previous versions
Contributor
There was a problem hiding this comment.
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_commandandsend_plv_commandcalls alongsidesend_pnw_commandinsend_all_player_info_to_one_client. - Introduced braces around the
ifblock 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_commandandsend_plv_commandare 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_commandandsend_plv_commandare called whenis_fully_connectedis true.
send_pin_command(game, clients, current, recipient);
ms-tristan
approved these changes
Jun 28, 2025
SamTess
approved these changes
Jun 28, 2025
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.
This pull request enhances the behavior of the
send_all_player_info_to_one_clientfunction in thecommand_pnw.cfile 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 tosend_pin_commandandsend_plv_commandalongside the existingsend_pnw_commandwithin thesend_all_player_info_to_one_clientfunction. These additions ensure that position and level information for AI players who are fully connected are also sent to the recipient client.