From bbfa614b656aa345e70174b6fdccd1804ca42fb6 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 26 Jun 2011 19:50:50 +0000 Subject: [PATCH] fix a bug in EntityFrame5 stats delta bits handling It forgot to memset the stats delta bits to 0, so it marked stats as being sent in the database that were not. This clearly caused too large resend data when packet loss occurred. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11219 d7cf8633-e32d-0410-b094-e92efae38249 --- protocol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protocol.c b/protocol.c index c263d2d3..304a2d61 100644 --- a/protocol.c +++ b/protocol.c @@ -2856,6 +2856,7 @@ qboolean EntityFrame5_WriteFrame(sizebuf_t *msg, int maxsize, entityframe5_datab packetlog = d->packetlog + packetlognumber; packetlog->packetnumber = framenum; packetlog->numstates = 0; + memset(packetlog->statsdeltabits, 0, sizeof(packetlog->statsdeltabits)); } packetlog->statsdeltabits[i>>3] |= (1<<(i&7)); if (host_client->stats[i] >= 0 && host_client->stats[i] < 256) @@ -2886,6 +2887,7 @@ qboolean EntityFrame5_WriteFrame(sizebuf_t *msg, int maxsize, entityframe5_datab packetlog = d->packetlog + packetlognumber; packetlog->packetnumber = framenum; packetlog->numstates = 0; + memset(packetlog->statsdeltabits, 0, sizeof(packetlog->statsdeltabits)); } // write state updates -- 2.39.2