From 2f0a402f9d14f05463a3c1457694fe0d57a61012 Mon Sep 17 00:00:00 2001 From: Dmitry Novikov Date: Mon, 14 Feb 2022 05:14:19 +0700 Subject: [PATCH] Netchan_FlushIncoming: Don't clear global buffer of incoming network messages (#896) * Netchan_FlushIncoming: Fixed #888 Co-authored-by: Artem Golubikhin --- rehlds/engine/net_chan.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rehlds/engine/net_chan.cpp b/rehlds/engine/net_chan.cpp index 88c5bae..f11875c 100644 --- a/rehlds/engine/net_chan.cpp +++ b/rehlds/engine/net_chan.cpp @@ -1389,8 +1389,13 @@ void Netchan_FlushIncoming(netchan_t *chan, int stream) { fragbuf_t *p, *n; - SZ_Clear(&net_message); - msg_readcount = 0; +#ifdef REHLDS_FIXES + if ((chan->player_slot - 1) == host_client - g_psvs.clients) +#endif + { + SZ_Clear(&net_message); + msg_readcount = 0; + } p = chan->incomingbufs[stream]; while (p)