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

Update bevy to 0.11 #93

Merged
merged 6 commits into from
Jul 14, 2023
Merged

Update bevy to 0.11 #93

merged 6 commits into from
Jul 14, 2023

Conversation

Olle-Lukowski
Copy link
Contributor

Just updates bevy to 0.11, and changes some stuff to fix errors. Let me know if I should make any changes!

Comment on lines 32 to 33
app.add_systems(PostUpdate, Self::send_packets.in_set(TransportSet::Server));
app.add_systems(PostUpdate, Self::disconnect_on_exit.in_set(TransportSet::Server));
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe group these systems in one call?
Similar for other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Comment on lines 74 to 75
app.add_systems(PostUpdate, Self::send_packets.in_set(TransportSet::Client));
app.add_systems(PostUpdate, Self::disconnect_on_exit.in_set(TransportSet::Client));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you combine these two systems too?

@lucaspoffo lucaspoffo self-requested a review July 12, 2023 18:14
@starwolfy
Copy link

There might be a regression. As the server I am unable to obtain the IP addresses of incoming connections. NetcodeServerTransport misses an implementation to return this data.

@@ -24,9 +24,9 @@ impl Plugin for RenetServerPlugin {
fn build(&self, app: &mut App) {
app.init_resource::<Events<ServerEvent>>();

app.configure_set(RenetSet::Server.run_if(resource_exists::<RenetServer>()));
app.configure_set(Update, RenetSet::Server.run_if(resource_exists::<RenetServer>()));
Copy link
Contributor

Choose a reason for hiding this comment

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

You configure set for Update, but use it in PreUpdate. I think that's the issue.

Copy link
Owner

Choose a reason for hiding this comment

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

Do we need to configure this with all default sets?
Like:

app.configure_set(PreUpdate, RenetSet::Server.run_if(resource_exists::<RenetServer>()));
app.configure_set(Update, RenetSet::Server.run_if(resource_exists::<RenetServer>()));
app.configure_set(PostUpdate, RenetSet::Server.run_if(resource_exists::<RenetServer>()));

This set is used to simplify the run_if(resource_exists::<RenetServer>()

Copy link
Owner

Choose a reason for hiding this comment

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

I guess we hit this issue:
bevyengine/bevy#9139

Copy link
Owner

Choose a reason for hiding this comment

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

It seems we shouldn't be using SystemSets, and should just use directly run_if(resource_exists::<RenetServer> / run_if(resource_exists::<RenetClient>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will go and remove the SystemSets.

Copy link
Contributor

Choose a reason for hiding this comment

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

I probably should remove the set enum too then.

@lucaspoffo
Copy link
Owner

There might be a regression. As the server I am unable to obtain the IP addresses of incoming connections. NetcodeServerTransport misses an implementation to return this data.

This is actually not exposed in the NetcodeServerTransport, it should be. I'll add it in another commit, pretty easy to do.

Copy link
Owner

@lucaspoffo lucaspoffo left a comment

Choose a reason for hiding this comment

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

Thanks! 🙏
Will work on porting the examples, prob tomorrow/weekend will release the new version 👍

@lucaspoffo lucaspoffo merged commit e763da5 into lucaspoffo:master Jul 14, 2023
@lucaspoffo lucaspoffo mentioned this pull request Jul 14, 2023
@Shatur
Copy link
Contributor

Shatur commented Jul 14, 2023

@lucaspoffo @Olle-Lukowski we forgot to remove RenetSet enum. Never mind, you removed it after the merge.

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.

4 participants