Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method for getting packet flags from ENetPacketPeer #95216

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

Chaosed0
Copy link
Contributor

@Chaosed0 Chaosed0 commented Aug 6, 2024

Fixes proposal 10240: godotengine/godot-proposals#10240

This PR adds the get_packet_flags method to ENetPacketPeer which can be used to obtain the flags sent with the packet. In my experimentation, it appears that not all flags are replicated from peer to peer, but it's unclear which are and which aren't (the ENet documentation does not specify), so I opted not to include this info explicitly in Godot's documentation.

This is my first PR, so let me know if I have missed anything.

Bugsquad edit:

@Chaosed0 Chaosed0 requested a review from a team as a code owner August 6, 2024 21:24
@Calinou Calinou added this to the 4.x milestone Aug 6, 2024
Copy link
Collaborator

@Faless Faless left a comment

Choose a reason for hiding this comment

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

LGTM, see my suggestion about the doc, nice work 🚀

@akien-mga
Copy link
Member

For the record, your commit seems not to be linked to your GitHub account. See: Why are my commits linked to the wrong user? for more info.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Oct 1, 2024
@Chaosed0 Chaosed0 force-pushed the enet-get-packet-flags branch from 9d837a3 to d36fa76 Compare October 1, 2024 18:10
@Chaosed0 Chaosed0 requested a review from a team as a code owner October 1, 2024 18:10
@Chaosed0
Copy link
Contributor Author

Chaosed0 commented Oct 1, 2024

Thanks for the heads up. I've rebased all the commits onto the latest master branch and updated all my commits to be the correct author. Hopefully that is the right way to resolve things.

@akien-mga
Copy link
Member

akien-mga commented Oct 1, 2024

It seems good, yes!

The final step for our PR workflow would be to squash the commits together. See this page for instructions.

I can also do it myself before merging tomorrow.
Edit: Done.

@akien-mga akien-mga force-pushed the enet-get-packet-flags branch from d36fa76 to 21c5a73 Compare October 2, 2024 12:34
@akien-mga akien-mga merged commit cd78220 into godotengine:master Oct 2, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose ENetPacket.flags through ENetPacketPeer
5 participants