-
Notifications
You must be signed in to change notification settings - Fork 0
Usernames #69
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
Merged
Merged
Usernames #69
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
5774770
wip
cb341 22fc498
Allow passing username from client to server
cb341 3598cc2
impl
cb341 16ef4c8
Fix stuff
cb341 a8b3511
Refactor
cb341 34a8f85
Implement player acceptance
cb341 578fe90
Add bevy mod billboard
cb341 e8ae125
Update chat display
cb341 e77fdd0
Refactor
cb341 1c862e5
Refactor
cb341 e507d9b
Expects
cb341 f741cc4
Improvements
cb341 535dd2b
L
cb341 7364bb4
Introduce `PendingDisconnect`
cb341 b143f2c
Username contraints
cb341 6f3f8da
Refactor username to be stack allocated
cb341 3661065
Implement Initial Spawn State
cb341 b20dbf7
Add pitch, yaw to spawn state
cb341 ded8ddf
Improve remote player display
cb341 784f4e8
Refactor
cb341 bd76d15
Fix tests
cb341 c417e37
Apply suggestion from @cb341
cb341 3c69a19
Refactor Username, add tests
cb341 c36638c
Remove server addr config
cb341 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| use clap::*; | ||
|
|
||
| use crate::networking::DEFAULT_SERVER_ADDR; | ||
| use crate::prelude::NetworkingPlugin; | ||
|
|
||
| #[derive(Parser, Debug)] | ||
| #[command(version, about, long_about = None)] | ||
| pub struct NetworkingArgs { | ||
| #[arg(short, long)] | ||
| username: String, | ||
| #[arg(short, long)] | ||
| server_addr: Option<String>, | ||
cb341 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| impl NetworkingPlugin { | ||
| pub fn from_args(args: NetworkingArgs) -> Result<Self, String> { | ||
| let server_addr = args | ||
| .server_addr | ||
| .unwrap_or_else(|| String::from(DEFAULT_SERVER_ADDR)); | ||
|
|
||
| NetworkingPlugin::new(&server_addr, args.username) | ||
| } | ||
| } | ||
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.