Hi all,

I'm absolutely stumped... After updating our local player in the movement block of packet 81 (which adds us to the update list there
if we set the update flag to true), I skip the other players movement as we can't update a players movement which isn't in the
update list (Am I interpreting this right by the way? It seems to work like this). So I head straight to the player list updating and do
the following:

  • If the connected players is > 1, we need to send that OTHER players index, i.e., our local player is 0, other player is 1
  • I write index 1 in an 11 bit value.
  • I send the update req (i.e., whether they have a mask appended to the packet for their appearance and such)
  • I send whether or not to discard the current tile queue (i.e., in the case of teleporting)
  • I finally send their x/y relative to our local player.


My result is the client reads for too long... It seems to be reading my appended mask as a part of this block. When I send 2047
with the mask appended for a single player, this works fine, am I doing something wrong with the masks?
I thought we just update the list with indexes 0 -> all other players who require update.
Then send the masks for each of those players who require updates and set the update required flag to true?

Here's a general log:
Code:
PACKET 81: Updating local player
Updating the player list, packet size is: 65
The bit position is (+10 after): 29
Mobs awaiting update: 1
OTHER PLAYER INDEX: 1
OTHER PLAYER INDEX: 134
OTHER PLAYER INDEX: 0
OTHER PLAYER INDEX: 1548
OTHER PLAYER INDEX: 256
OTHER PLAYER INDEX: 387
OTHER PLAYER INDEX: 1160
OTHER PLAYER INDEX: 320
OTHER PLAYER INDEX: 16
OTHER PLAYER INDEX: 0
OTHER PLAYER INDEX: 26
OTHER PLAYER INDEX: 1544
OTHER PLAYER INDEX: 1280
OTHER PLAYER INDEX: 1025
OTHER PLAYER INDEX: 204
OTHER PLAYER INDEX: 1664
OTHER PLAYER INDEX: 51
OTHER PLAYER INDEX: 448
OTHER PLAYER INDEX: 0
OTHER PLAYER INDEX: 236
OTHER PLAYER INDEX: 1802
MASK ID: 0
MASK ID: 0
MASK ID: 0
MASK ID: 0
MASK ID: 0
MASK ID: 0
In this instance, there's 1 other player who does not require an update mask. So the packet size seems correct, but like I said it appears to be reading my local players update mask data as player indexes lol. Can someone please help me with what's going on?
Shall I send the masks separately? I.e., right after the updating, flush the packet and immediately send the masks after?

I think I should but am not sure because it reads the entire packet-size to determine howmany indexes to read through:

Code:
private final void updatePlayerList(Buffer buffer, int packetSize) {
Again, not the most complex question but I just want solid confirmation that's all before I go ahead and try it.

Thanks again, and I appreciate all and any help!