toon: send player dna as bytes instead of string

This commit is contained in:
John Cote 2020-01-02 15:23:27 -05:00
parent fcbcd00e45
commit 23bc0691c7
2 changed files with 2 additions and 5 deletions

View file

@ -524,7 +524,7 @@ dclass CallbackObject {
struct PotentialAvatar { struct PotentialAvatar {
uint32 avNum; uint32 avNum;
string avName; string avName;
string avDNA; blob avDNA;
uint8 avPosition; uint8 avPosition;
uint8 nameState; uint8 nameState;
}; };

View file

@ -2519,10 +2519,7 @@ class ToonDNA(AvatarDNA.AvatarDNA):
return True return True
def makeFromNetString(self, string): def makeFromNetString(self, string):
if type(string) == bytes:
dg = PyDatagram(string) dg = PyDatagram(string)
else:
dg = PyDatagram(string.encode('utf-8'))
dgi = PyDatagramIterator(dg) dgi = PyDatagramIterator(dg)
self.type = dgi.getFixedString(1) self.type = dgi.getFixedString(1)
if self.type == 't': if self.type == 't':