diff options
Diffstat (limited to 'NetServer.cs')
| -rw-r--r-- | NetServer.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/NetServer.cs b/NetServer.cs index a8e3130..875ddfd 100644 --- a/NetServer.cs +++ b/NetServer.cs @@ -53,6 +53,8 @@ class Server if (info.Type == PacketType.UserInfo) { user.Username = dataReader.GetString(); if (user.Username.Length > 40) user.Username = user.Username[0..40]; //Clamp username length + user.Nekoname = dataReader.GetString(); + if (user.Nekoname.Length > 40) user.Nekoname = user.Nekoname[0..40]; //Clamp nekoname length user.SpriteSheet = dataReader.GetBytesWithLength(); if (!user.Initialized) { @@ -71,12 +73,14 @@ class Server //Send all current users spritesheets to this user. writer.ResetWithInfo(new PacketInfo(PacketType.UserInfo, toSend.Id)); writer.Put(toSend.Username); + writer.Put(toSend.Nekoname); writer.PutBytesWithLength(toSend.SpriteSheet); fromPeer.Send(writer, DeliveryMethod.ReliableUnordered); //Send all current users this users spritesheet writer.ResetWithInfo(new PacketInfo(PacketType.UserInfo, user.Id)); writer.Put(user.Username); + writer.Put(user.Nekoname); writer.PutBytesWithLength(user.SpriteSheet); toSend.Peer.Send(writer, DeliveryMethod.ReliableUnordered); } |
