aboutsummaryrefslogtreecommitdiff
path: root/pixel-client/src/game.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-15 01:35:46 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-15 01:35:46 +0200
commit9a17ee0e31c4ee4fbf75e5f1bc007a99bbe5ed4b (patch)
tree52660eecfcb318e274bbdddd5415467f0f0f07ad /pixel-client/src/game.rs
parentbd4bb93e6da8d7f8dd3ad86ba1bea1fd8892a1a1 (diff)
downloadhurrycurry-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.rs5
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,
});