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

Spaceship Selection UI And Mechanics #107

Merged
merged 17 commits into from
Feb 7, 2025
Merged

Conversation

Sheerwin02
Copy link
Collaborator

@Sheerwin02 Sheerwin02 commented Feb 5, 2025

Resolves #108

Copy link
Owner

@nixon-voxell nixon-voxell left a comment

Choose a reason for hiding this comment

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

Overall very nice, works really well!

Comment on lines 80 to 84
let join_msg = SelectSpaceship {
spaceship: ship_type,
};
if let Err(e) = connection_manager.send_message::<OrdReliableChannel, _>(&join_msg) {
error!("Failed to send JoinLobby message: {:?}", e);
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
let join_msg = SelectSpaceship {
spaceship: ship_type,
};
if let Err(e) = connection_manager.send_message::<OrdReliableChannel, _>(&join_msg) {
error!("Failed to send JoinLobby message: {:?}", e);
let select_msg = SelectSpaceship {
spaceship: ship_type,
};
if let Err(e) = connection_manager.send_message::<OrdReliableChannel, _>(&select_msg) {
error!("Failed to send SelectSpaceship message: {:?}", e);

Copy link
Owner

@nixon-voxell nixon-voxell Feb 5, 2025

Choose a reason for hiding this comment

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

One important thing to note here is that you also need to make sure that you cleanup the sent message at the server on client disconnection.

For that, I will make a push to demonstrate that.

@nixon-voxell nixon-voxell self-requested a review February 7, 2025 05:51
@nixon-voxell nixon-voxell merged commit 841a37f into main Feb 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add spaceship selection UI
2 participants