Closed ChillerDragon closed 1 year ago
Why is it two bytes? Is it always two bytes? Is the sys flag in the middle? But at the end when int unpacked?
Most of them seem 1 byte. This is the first two byter i noticed
Okay I think I got it. Call vote is actually the first message that overflows into two bytes. Why? Well because its int packed and mixed with the sys flag. So the int packer eats up 2 bits (extended bit and sign bit) and the sys flag one more. Meaning we take one byte (8 bits) and remove 3 fields then we are left with the maximum number
ES11 111S
11 111 => 31
So everything from here on wards will be 2 bytes https://chillerdragon.github.io/teeworlds-protocol/07/game_messages.html#NETMSGTYPE_CL_CALLVOTE
irb(main):008:0> "01".to_i(16).to_s(2).rjust(8, '0') => "00000001" irb(main):009:0> "80".to_i(16).to_s(2).rjust(8, '0') => "10000000"