Packet 81: Player Update
Notes: P1 = Parameter 1 of writeBits, P2 = Parameter 2 of writeBits
I will be using some pseudocode (just a bit easier for me)
If (P1 = 1)
Then you are setting the bit that tells the client there is an update appended at the end of something (the packet?)
If (P2 = 0)
There is no update at the end of something.
If (P2 = 1 And P2 = 0)
There is an update block appended at the end of something.
If (P1 = 2)
Then you are setting the walking/running bit.
If (P2 = 0 And P1 = 1)
There is an update block appended at the end of something.
If (P2 = 1)
The character is walking.
If (P2 = 2)
The character is running.
If (P1 = 3)
N:0, NE:2, E:4, SE:6, S:8, SW:10, W:12, NW:14 are the valid values for Dir1 which uses
xlateDirectionToClient[dir1] when xlateDirection is {1, 2, 4, 7, 6, 5, 3, 0}***
If (P1 = 7)
P2 is either the players current X or Y coordinate. Player.java first sends Y then X.
Note***: I'm not completely sure if this is right. It might just be me something about being a byte array.
Dir1 has to be positive to get here.