From fb48fac82baa01bb51650ff8b5db207a54abdbfd Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 8 Dec 2011 19:48:03 +0000 Subject: [PATCH] print E5_COMPLEXANIMATION and E5_TRAILEFFECTNUM in developer_networkentities, also print bytes per entity update git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11602 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_parse.c | 2 +- protocol.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cl_parse.c b/cl_parse.c index 55e1a79a..5f97c53a 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -167,7 +167,7 @@ cvar_t cl_worldname = {CVAR_READONLY, "cl_worldname", "", "name of current world cvar_t cl_worldnamenoextension = {CVAR_READONLY, "cl_worldnamenoextension", "", "name of current worldmodel without extension"}; cvar_t cl_worldbasename = {CVAR_READONLY, "cl_worldbasename", "", "name of current worldmodel without maps/ prefix or extension"}; -cvar_t developer_networkentities = {0, "developer_networkentities", "0", "prints received entities, value is 0-4 (higher for more info)"}; +cvar_t developer_networkentities = {0, "developer_networkentities", "0", "prints received entities, value is 0-10 (higher for more info, 10 being the most verbose)"}; cvar_t cl_gameplayfix_soundsmovewithentities = {0, "cl_gameplayfix_soundsmovewithentities", "1", "causes sounds made by lifts, players, projectiles, and any other entities, to move with the entity, so for example a rocket noise follows the rocket rather than staying at the starting position"}; cvar_t cl_sound_wizardhit = {0, "cl_sound_wizardhit", "wizard/hit.wav", "sound to play during TE_WIZSPIKE (empty cvar disables sound)"}; cvar_t cl_sound_hknighthit = {0, "cl_sound_hknighthit", "hknight/hit.wav", "sound to play during TE_KNIGHTSPIKE (empty cvar disables sound)"}; diff --git a/protocol.c b/protocol.c index d63d0918..740434cf 100644 --- a/protocol.c +++ b/protocol.c @@ -2316,6 +2316,8 @@ void EntityState5_WriteUpdate(int number, const entity_state_t *s, int changedbi static void EntityState5_ReadUpdate(entity_state_t *s, int number) { int bits; + int startoffset = cl_message.readcount; + int bytes = 0; bits = MSG_ReadByte(&cl_message); if (bits & E5_EXTEND1) { @@ -2531,9 +2533,10 @@ static void EntityState5_ReadUpdate(entity_state_t *s, int number) s->traileffectnum = (unsigned short) MSG_ReadShort(&cl_message); + bytes = cl_message.readcount - startoffset; if (developer_networkentities.integer >= 2) { - Con_Printf("ReadFields e%i", number); + Con_Printf("ReadFields e%i (%i bytes)", number, bytes); if (bits & E5_ORIGIN) Con_Printf(" E5_ORIGIN %f %f %f", s->origin[0], s->origin[1], s->origin[2]); @@ -2586,6 +2589,10 @@ static void EntityState5_ReadUpdate(entity_state_t *s, int number) Con_Printf(" E5_COLORMOD %f:%f:%f", s->colormod[0] / 32.0f, s->colormod[1] / 32.0f, s->colormod[2] / 32.0f); if (bits & E5_GLOWMOD) Con_Printf(" E5_GLOWMOD %f:%f:%f", s->glowmod[0] / 32.0f, s->glowmod[1] / 32.0f, s->glowmod[2] / 32.0f); + if (bits & E5_COMPLEXANIMATION) + Con_Printf(" E5_COMPLEXANIMATION"); + if (bits & E5_TRAILEFFECTNUM) + Con_Printf(" E5_TRAILEFFECTNUM %i", s->traileffectnum); Con_Print("\n"); } } -- 2.39.2