Merge branch 'jgrpp' into jgrpp-beta
# Conflicts: # src/network/core/packet.cpp # src/network/core/udp.cpp
This commit is contained in:
@@ -423,7 +423,7 @@ void Packet::Recv_string(std::string &buffer, StringValidationSettings settings)
|
||||
|
||||
size_t length = ttd_strnlen((const char *)(this->buffer.data() + this->pos), this->Size() - this->pos - 1);
|
||||
buffer.assign((const char *)(this->buffer.data() + this->pos), length);
|
||||
this->pos += (uint)length + 1;
|
||||
this->pos += (PacketSize)length + 1;
|
||||
StrMakeValidInPlace(buffer, settings);
|
||||
}
|
||||
|
||||
|
@@ -1115,7 +1115,11 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_FRAME(Packet *p
|
||||
#ifdef ENABLE_NETWORK_SYNC_EVERY_FRAME
|
||||
/* Test if the server supports this option
|
||||
* and if we are at the frame the server is */
|
||||
if (p->pos + 1 < p->size) {
|
||||
#ifdef NETWORK_SEND_DOUBLE_SEED
|
||||
if (p->CanReadFromPacket(4 + 4 + 8)) {
|
||||
#else
|
||||
if (p->CanReadFromPacket(4 + 8)) {
|
||||
#endif
|
||||
_sync_frame = _frame_counter_server;
|
||||
_sync_seed_1 = p->Recv_uint32();
|
||||
#ifdef NETWORK_SEND_DOUBLE_SEED
|
||||
|
@@ -41,9 +41,6 @@
|
||||
|
||||
extern const uint8 _out_of_band_grf_md5[16] { 0x00, 0xB0, 0xC0, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xC0, 0xDE, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
/** Mutex for all out threaded udp resolution and such. */
|
||||
static std::mutex _network_udp_mutex;
|
||||
|
||||
/** Session key to register ourselves to the master server */
|
||||
static uint64 _session_key = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user