Closed ghost closed 7 years ago
I've added two extra commits to this pr c004d32 is just a minor code cleanup, 398e935 makes accessing the data in the packet classes more consistent.
It turns out the strings are utf-16 encoded. On Python 3 it works, on Python 2 it drops the characters that it can't convert to utf-8. This isn't ideal but it's the only working solution at the moment. Python 2 and unicode is painful.
This pr adds ParticipantInfoStringsAdditionalPacket it's only generated during multiplayer races with more than 16 participants (PC only).
Also all string parameters need checked for a null character and everything after the null character needs removed. This is a python unique thing as C/C++ always stop at the null character.