From 9a17ee0e31c4ee4fbf75e5f1bc007a99bbe5ed4b Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 15 Aug 2024 01:35:46 +0200 Subject: pc: add username setting --- pixel-client/src/game.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pixel-client/src/game.rs') 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, }); -- cgit v1.2.3-70-g09d2