From a04ab44ecc862e25cf2296763244975925c9457b Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 29 May 2020 17:53:35 +1000 Subject: [PATCH] Make sure all the major bits are sent when updating stats --- qcsrc/lib/stats.qh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/lib/stats.qh b/qcsrc/lib/stats.qh index 3727286197..39a375351b 100644 --- a/qcsrc/lib/stats.qh +++ b/qcsrc/lib/stats.qh @@ -99,7 +99,7 @@ STATIC_INIT(Stats_renumber) { FOREACH(Stats, true, it.m_id = i); } REGISTER_NET_LINKED(ENT_CLIENT_STATS) -const int Stats_groups_minor = 24; // exactly 1 byte +const int Stats_groups_minor = 24; const int Stats_groups_major = 11; // ceil(Stats_MAX / Stats_groups_minor) #define G_MAJOR(id) (floor((id) / Stats_groups_minor)) @@ -110,7 +110,7 @@ const int Stats_groups_major = 11; // ceil(Stats_MAX / Stats_groups_minor) NET_HANDLE(ENT_CLIENT_STATS, bool isnew) { make_pure(this); - const int majorBits = ReadByte(); + const int majorBits = ReadInt24_t(); for (int i = 0; i < Stats_groups_major; ++i) { if (!(majorBits & BIT(i))) { continue; @@ -151,7 +151,7 @@ void Stats_Write(entity data) statsminorBitsArr[maj] = BITSET(statsminorBitsArr[maj], BIT(G_MINOR(it.m_id)), true); } }); - WriteByte(MSG_ENTITY, majorBits); + WriteInt24_t(MSG_ENTITY, majorBits); for (int i = 0; i < Stats_groups_major; ++i) { -- 2.39.2