From 3792bf2bef9f4312956afb54b47878c4580f7d01 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 17 Apr 2005 21:15:50 +0000 Subject: [PATCH] fixed a bug in CL_ParseClientdata that was breaking on hipnotic demos git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5192 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_parse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cl_parse.c b/cl_parse.c index 43b82068..02307731 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -606,9 +606,9 @@ CL_ParseClientdata Server information pertaining to this client only ================== */ -void CL_ParseClientdata (int bits) +void CL_ParseClientdata (void) { - int i, j; + int i, j, bits; VectorCopy (cl.mpunchangle[0], cl.mpunchangle[1]); VectorCopy (cl.mpunchvector[0], cl.mpunchvector[1]); @@ -633,7 +633,7 @@ void CL_ParseClientdata (int bits) cl.mvelocity[0][2] = 0; cl.mviewzoom[0] = 1; - bits &= 0xFFFF; + bits = (unsigned short) MSG_ReadShort (); if (bits & SU_EXTEND1) bits |= (MSG_ReadByte() << 16); if (bits & SU_EXTEND2) @@ -676,7 +676,8 @@ void CL_ParseClientdata (int bits) } } - if (bits & SU_ITEMS) + // LordHavoc: hipnotic demos don't have this bit set +// [always sent] if (bits & SU_ITEMS) cl.stats[STAT_ITEMS] = MSG_ReadLong (); cl.onground = (bits & SU_ONGROUND) != 0; @@ -1442,8 +1443,7 @@ void CL_ParseServerMessage(void) break; case svc_clientdata: - i = (unsigned short) MSG_ReadShort (); - CL_ParseClientdata (i); + CL_ParseClientdata(); break; case svc_version: -- 2.39.2