diff --git a/common/main/net_udp.h b/common/main/net_udp.h index 024ebb1a1..dbcef5112 100644 --- a/common/main/net_udp.h +++ b/common/main/net_udp.h @@ -136,14 +136,14 @@ struct UDP_frame_info : prohibit_void_ptr }; // packet structure for multi-buffer -struct UDP_mdata_info +struct UDP_mdata_info : prohibit_void_ptr { ubyte type; ubyte Player_num; uint32_t pkt_num; ushort mbuf_size; ubyte mbuf[UPID_MDATA_BUF_SIZE]; -} __pack__; +}; // structure to store MDATA to maybe resend struct UDP_mdata_store diff --git a/similar/main/net_udp.cpp b/similar/main/net_udp.cpp index c7c79401a..b47624e12 100644 --- a/similar/main/net_udp.cpp +++ b/similar/main/net_udp.cpp @@ -1073,7 +1073,7 @@ void net_udp_init() Netgame = {}; UDP_Seq = {}; - memset(&UDP_MData, 0, sizeof(UDP_mdata_info)); + UDP_MData = {}; net_udp_noloss_init_mdata_queue(); UDP_Seq.type = UPID_REQUEST; memcpy(UDP_Seq.player.callsign, Players[Player_num].callsign, CALLSIGN_LEN+1); @@ -3932,7 +3932,7 @@ net_udp_level_sync(void) { int result = 0; - memset(&UDP_MData, 0, sizeof(UDP_mdata_info)); + UDP_MData = {}; net_udp_noloss_init_mdata_queue(); net_udp_flush(); // Flush any old packets