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 {
uint32 avNum;
string avName;
string avDNA;
blob avDNA;
uint8 avPosition;
uint8 nameState;
};

View file

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