Fix name message

This commit is contained in:
Pascal Serrarens 2024-12-09 17:22:30 +01:00
parent 6e5b923f97
commit cdd1a7a53f

View File

@ -268,7 +268,8 @@ namespace Passer.Control {
return buffer;
}
public override void Deserialize(byte[] buffer) {
uint ix = 0;
byte ix = 0;
this.networkId = buffer[ix++];
this.thingId = buffer[ix++];
int strlen = buffer[ix++];
this.name = System.Text.Encoding.UTF8.GetString(buffer, (int)ix, strlen);
@ -405,6 +406,7 @@ namespace Passer.Control {
return SendMsg(client, msg);
}
public static async Task<bool> Receive(Stream dataStream, Client client, byte packetSize) {
UnityEngine.Debug.Log("Receive pose");
if (packetSize != length)
return false;