]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
improved pr_fields command to list how many entities are using each entity field...
[xonotic/darkplaces.git] / sv_main.c
index 3f17d4112ac4cd231af9f07b70c45452f025499b..0a5b5bdf8c500f8de57c1d204f52d538106b5d40 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -889,7 +889,10 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
        // applies the view_ofs[2], so we have to only send the fractional part
        // of view_ofs[2], undoing what the client will redo)
        VectorCopy (testeye, testorigin);
-       testorigin[2] -= (float) ((int)(clent->v.view_ofs[2]) & 255);
+       e = (int) clent->v.view_ofs[2] & 255;
+       if (e >= 128)
+               e -= 256;
+       testorigin[2] -= (float) e;
        EntityFrame_Clear(&entityframe, testorigin);
 
        culled_pvs = 0;
@@ -1094,6 +1097,8 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
                        break;
                VectorCopy(origin, s->origin);
                VectorCopy(angles, s->angles);
+               if (ent->v.colormap >= 1024)
+                       flags |= RENDER_COLORMAPPED;
                s->colormap = ent->v.colormap;
                s->skin = ent->v.skin;
                s->frame = ent->v.frame;