Open bluebear94 opened 7 years ago
Not really understanding your problem. As far as I can see, timestamps should be transformed into network order by library user.
I am writing and reading them in network order using the BitStream
class.
Actually, removing from Source/RakPeer.cpp
the line (3799):
timeBS.EndianSwapBytes(0,sizeof(RakNet::Time));
fixes the issue. However, I'm not sure if this triggers any bugs with big-endian platforms.
I believe you client and server have different edian formate, one little, the other big. raknet in default uses big-endian if you enable endian swap macro. So, I am gussing the reason could be that endian-swao-macro is not enabled in either of your client and server.
I'm building both the client and the server with the same library.
Yea, I have the same problem as bluebear94. The ending swapping should be done by the BitStream on both sides... unless you have __BITSTREAM_NATIVE_END disabled. The way I see it, you should put host byte order into BitStream and it does the conversion, since that is what RakNet does itself (see NAT punch through server for example)
This at least happens on Linux (Ubuntu 16.04), and with 64-bit timestamps enabled or disabled.