diff options
author | metamuffin <metamuffin@disroot.org> | 2024-08-15 01:35:46 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-08-15 01:35:46 +0200 |
commit | 9a17ee0e31c4ee4fbf75e5f1bc007a99bbe5ed4b (patch) | |
tree | 52660eecfcb318e274bbdddd5415467f0f0f07ad /pixel-client/src/game.rs | |
parent | bd4bb93e6da8d7f8dd3ad86ba1bea1fd8892a1a1 (diff) | |
download | hurrycurry-9a17ee0e31c4ee4fbf75e5f1bc007a99bbe5ed4b.tar hurrycurry-9a17ee0e31c4ee4fbf75e5f1bc007a99bbe5ed4b.tar.bz2 hurrycurry-9a17ee0e31c4ee4fbf75e5f1bc007a99bbe5ed4b.tar.zst |
pc: add username setting
Diffstat (limited to 'pixel-client/src/game.rs')
-rw-r--r-- | pixel-client/src/game.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pixel-client/src/game.rs b/pixel-client/src/game.rs index 0a0fc22d..318b9a02 100644 --- a/pixel-client/src/game.rs +++ b/pixel-client/src/game.rs @@ -16,6 +16,7 @@ */ use crate::{ + config::Config, helper::InterpolateExt, render::{ misc::MiscTextures, @@ -82,10 +83,10 @@ pub struct Item { } impl Game { - pub fn new(mut network: Network, layout: &AtlasLayout) -> Self { + pub fn new(mut network: Network, config: &Config, layout: &AtlasLayout) -> Self { network.queue_out.push_back(PacketS::Join { id: None, - name: "pixel".to_string(), + name: config.username.clone(), character: 0, }); |