]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - protocol.c
Use PRIx64 in C++-friendly form
[xonotic/darkplaces.git] / protocol.c
index c0c8ac9d7e78ad07a44ab4e6862c6243cf7602f2..073828ee21f9768383d75f99e12e66d733fafa19 100644 (file)
@@ -6,8 +6,8 @@
 #define ENTITYSIZEPROFILING_END(msg, num, flags) \
        if(developer_networkentities.integer >= 2) \
        { \
-               prvm_edict_t *ed = prog->edicts + num; \
-               Con_Printf("sent entity update of size %u for %d classname %s flags %d\n", (msg->cursize - entityprofiling_startsize), num, PRVM_serveredictstring(ed, classname) ? PRVM_GetString(prog, PRVM_serveredictstring(ed, classname)) : "(no classname)", flags); \
+               prvm_edict_t *edict = prog->edicts + num; \
+               Con_Printf("sent entity update of size %u for %d classname %s flags %d\n", (msg->cursize - entityprofiling_startsize), num, PRVM_serveredictstring(edict, classname) ? PRVM_GetString(prog, PRVM_serveredictstring(edict, classname)) : "(no classname)", flags); \
        }
 
 // CSQC entity scope values. Bitflags!
@@ -54,7 +54,7 @@ entity_state_t defaultstate =
        {32, 32, 32},//unsigned char glowmod[3];
 };
 
-// LordHavoc: I own protocol ranges 96, 97, 3500-3599
+// LadyHavoc: I own protocol ranges 96, 97, 3500-3599
 
 struct protocolversioninfo_s
 {
@@ -212,10 +212,10 @@ void EntityFrameQuake_ReadEntity(int bits)
        if (bits & U_VIEWMODEL) s.flags |= RENDER_VIEWMODEL;
        if (bits & U_EXTERIORMODEL)     s.flags |= RENDER_EXTERIORMODEL;
 
-       // LordHavoc: to allow playback of the Nehahra movie
+       // LadyHavoc: to allow playback of the Nehahra movie
        if (cls.protocol == PROTOCOL_NEHAHRAMOVIE && (bits & U_EXTEND1))
        {
-               // LordHavoc: evil format
+               // LadyHavoc: evil format
                int i = (int)MSG_ReadFloat(&cl_message);
                int j = (int)(MSG_ReadFloat(&cl_message) * 255.0f);
                if (i == 2)
@@ -735,7 +735,7 @@ qboolean EntityFrameQuake_WriteFrame(sizebuf_t *msg, int maxsize, int numstates,
                if (s->flags & RENDER_EXTERIORMODEL)
                        bits |= U_EXTERIORMODEL;
 
-               // LordHavoc: old stuff, but rewritten to have more exact tolerances
+               // LadyHavoc: old stuff, but rewritten to have more exact tolerances
                baseline = prog->edicts[s->number].priv.server->baseline;
                if (baseline.origin[0] != s->origin[0])
                        bits |= U_ORIGIN1;
@@ -962,7 +962,7 @@ void EntityState_WriteFields(const entity_state_t *ent, sizebuf_t *msg, unsigned
        }
        else
        {
-               // LordHavoc: have to write flags first, as they can modify protocol
+               // LadyHavoc: have to write flags first, as they can modify protocol
                if (bits & E_FLAGS)
                        MSG_WriteByte(msg, ent->flags);
                if (ent->flags & RENDER_LOWPRECISION)
@@ -1700,10 +1700,12 @@ int EntityFrame4_AckFrame(entityframe4_database_t *d, int framenum, int servermo
                // reset reference, but leave commits alone
                d->referenceframenum = -1;
                for (i = 0;i < d->maxreferenceentities;i++)
+               {
                        d->referenceentity[i] = defaultstate;
                // if this is the server, remove commits
                        for (i = 0, commit = d->commit;i < MAX_ENTITY_HISTORY;i++, commit++)
                                commit->numentities = 0;
+               }
                found = true;
        }
        else if (d->referenceframenum == framenum)
@@ -2832,7 +2834,7 @@ void EntityFrame5_AckFrame(entityframe5_database_t *d, int framenum)
                        d->packetlog[i].packetnumber = 0;
 }
 
-qboolean EntityFrame5_WriteFrame(sizebuf_t *msg, int maxsize, entityframe5_database_t *d, int numstates, const entity_state_t **states, int viewentnum, int movesequence, qboolean need_empty)
+qboolean EntityFrame5_WriteFrame(sizebuf_t *msg, int maxsize, entityframe5_database_t *d, int numstates, const entity_state_t **states, int viewentnum, unsigned int movesequence, qboolean need_empty)
 {
        prvm_prog_t *prog = SVVM_prog;
        const entity_state_t *n;
@@ -3364,7 +3366,7 @@ void EntityFrameQW_CL_ReadFrame(qboolean delta)
                        if (newnum != oldnum && !delta && !invalid)
                        {
                                cl.qw_validsequence = 0;
-                               Con_Printf("WARNING: U_REMOVE %i on full update\n", newnum);
+                               Con_Printf(CON_WARN "WARNING: U_REMOVE %i on full update\n", newnum);
                        }
                }
                else