]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
print E5_COMPLEXANIMATION and E5_TRAILEFFECTNUM in
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Dec 2011 19:48:03 +0000 (19:48 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Dec 2011 19:48:03 +0000 (19:48 +0000)
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
protocol.c

index 55e1a79a50410d36793ffaba9c3db78f2838639e..5f97c53aa23fc08f95294c0dea1a4a6c5de82f58 100644 (file)
@@ -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)"};
index d63d0918af10111711fda04ef9eafd38248bfa8c..740434cf9a2853095c9529b583882c5bf2365138 100644 (file)
@@ -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");
        }
 }