From ee4026ec4ec863e9271922ec8acd905e915213a7 Mon Sep 17 00:00:00 2001 From: WPMGPRoSToTeMa Date: Thu, 22 Dec 2016 05:07:00 +0300 Subject: [PATCH] Fixed "Malformed packet size" on packets from server to client --- rehlds/engine/net_chan.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/rehlds/engine/net_chan.cpp b/rehlds/engine/net_chan.cpp index 052d231..efafa33 100644 --- a/rehlds/engine/net_chan.cpp +++ b/rehlds/engine/net_chan.cpp @@ -275,14 +275,18 @@ void Netchan_UpdateFlow(netchan_t *chan) void Netchan_Transmit(netchan_t *chan, int length, byte *data) { - byte send_buf[NET_MAX_MESSAGE]; - qboolean send_reliable; - qboolean send_reliable_fragment; - qboolean send_resending = false; - unsigned w1, w2; +#ifdef REHLDS_FIXES + byte send_buf[MAX_UDP_PACKET]; +#else + byte send_buf[NET_MAX_MESSAGE]; +#endif + qboolean send_reliable; + qboolean send_reliable_fragment; + qboolean send_resending = false; + unsigned w1, w2; int i, j; - float fRate; + float fRate; sizebuf_t sb_send; sb_send.data = send_buf;