Strip residual sw-specific colormap stuff.

This commit is contained in:
Shpoike 2020-09-03 10:59:23 +01:00
parent b1f93c7f3d
commit 2e92fbf1d4
5 changed files with 5 additions and 55 deletions

View file

@ -196,7 +196,6 @@ entity_t *CL_EntityNum (int num)
while (cl.num_entities<=num) while (cl.num_entities<=num)
{ {
cl.entities[cl.num_entities].baseline = nullentitystate; cl.entities[cl.num_entities].baseline = nullentitystate;
cl.entities[cl.num_entities].colormap = vid.colormap;
cl.entities[cl.num_entities].lerpflags |= LERP_RESETMOVE|LERP_RESETANIM; //johnfitz cl.entities[cl.num_entities].lerpflags |= LERP_RESETMOVE|LERP_RESETANIM; //johnfitz
cl.num_entities++; cl.num_entities++;
} }
@ -531,7 +530,7 @@ static void CLFTE_ParseBaseline(entity_state_t *es)
//called with both fte+dp deltas //called with both fte+dp deltas
static void CL_EntitiesDeltaed(void) static void CL_EntitiesDeltaed(void)
{ {
int i, newnum; int newnum;
qmodel_t *model; qmodel_t *model;
qboolean forcelink; qboolean forcelink;
entity_t *ent; entity_t *ent;
@ -554,15 +553,6 @@ static void CL_EntitiesDeltaed(void)
ent->msgtime = cl.mtime[0]; ent->msgtime = cl.mtime[0];
i = ent->netstate.colormap;
if (!i)
ent->colormap = vid.colormap;
else
{
if (i > cl.maxclients)
Sys_Error ("i >= cl.maxclients");
ent->colormap = cl.scores[i-1].translations;
}
skin = ent->netstate.skin; skin = ent->netstate.skin;
if (skin != ent->skinnum) if (skin != ent->skinnum)
{ {
@ -1506,17 +1496,7 @@ static void CL_ParseUpdate (int bits)
ent->frame = ent->baseline.frame; ent->frame = ent->baseline.frame;
if (bits & U_COLORMAP) if (bits & U_COLORMAP)
i = MSG_ReadByte(); ent->netstate.colormap = MSG_ReadByte();
else
i = ent->baseline.colormap;
if (!i)
ent->colormap = vid.colormap;
else
{
if (i > cl.maxclients)
Sys_Error ("i >= cl.maxclients");
ent->colormap = cl.scores[i-1].translations;
}
if (bits & U_SKIN) if (bits & U_SKIN)
skin = MSG_ReadByte(); skin = MSG_ReadByte();
else else
@ -1886,37 +1866,9 @@ CL_NewTranslation
*/ */
static void CL_NewTranslation (int slot) static void CL_NewTranslation (int slot)
{ {
int i, j;
int top, bottom;
byte *dest, *source;
if (slot > cl.maxclients) if (slot > cl.maxclients)
Sys_Error ("CL_NewTranslation: slot > cl.maxclients"); Sys_Error ("CL_NewTranslation: slot > cl.maxclients");
dest = cl.scores[slot].translations;
source = vid.colormap;
memcpy (dest, vid.colormap, sizeof(cl.scores[slot].translations));
top = cl.scores[slot].colors & 0xf0;
bottom = (cl.scores[slot].colors &15)<<4;
R_TranslatePlayerSkin (slot); R_TranslatePlayerSkin (slot);
for (i = 0; i < VID_GRADES; i++, dest += 256, source+=256)
{
if (top < 128) // the artists made some backwards ranges. sigh.
memcpy (dest + TOP_RANGE, source + top, 16);
else
{
for (j = 0; j < 16; j++)
dest[TOP_RANGE+j] = source[top+15-j];
}
if (bottom < 128)
memcpy (dest + BOTTOM_RANGE, source + bottom, 16);
else
{
for (j = 0; j < 16; j++)
dest[BOTTOM_RANGE+j] = source[bottom+15-j];
}
}
} }
/* /*
@ -1957,7 +1909,6 @@ static void CL_ParseStatic (int version) //johnfitz -- added a parameter
ent->lerpflags |= LERP_RESETANIM; //johnfitz -- lerping ent->lerpflags |= LERP_RESETANIM; //johnfitz -- lerping
ent->frame = ent->baseline.frame; ent->frame = ent->baseline.frame;
ent->colormap = vid.colormap;
ent->skinnum = ent->baseline.skin; ent->skinnum = ent->baseline.skin;
ent->effects = ent->baseline.effects; ent->effects = ent->baseline.effects;
ent->alpha = ent->baseline.alpha; //johnfitz -- alpha ent->alpha = ent->baseline.alpha; //johnfitz -- alpha

View file

@ -520,7 +520,7 @@ entity_t *CL_NewTempEntity (void)
ent->netstate.scale = 16; ent->netstate.scale = 16;
ent->netstate.colormod[0] = ent->netstate.colormod[1] = ent->netstate.colormod[2] = 32; ent->netstate.colormod[0] = ent->netstate.colormod[1] = ent->netstate.colormod[2] = 32;
ent->colormap = vid.colormap; ent->netstate.colormap = 0;
return ent; return ent;
} }

View file

@ -1137,7 +1137,7 @@ void R_DrawAliasModel (entity_t *e)
tx = paliashdr->gltextures[skinnum][anim]; tx = paliashdr->gltextures[skinnum][anim];
fb = paliashdr->fbtextures[skinnum][anim]; fb = paliashdr->fbtextures[skinnum][anim];
} }
if (e->colormap != vid.colormap && !gl_nocolors.value) if (e->netstate.colormap && !gl_nocolors.value)
{ {
i = e - cl.entities; i = e - cl.entities;
if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */) if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)

View file

@ -65,7 +65,6 @@ typedef struct entity_s
struct efrag_s *efrag; // linked list of efrags struct efrag_s *efrag; // linked list of efrags
int frame; int frame;
float syncbase; // for client-side animations float syncbase; // for client-side animations
byte *colormap;
int effects; // light, particles, etc int effects; // light, particles, etc
int skinnum; // for Alias models int skinnum; // for Alias models
int visframe; // last frame this entity was int visframe; // last frame this entity was

View file

@ -857,7 +857,7 @@ void V_CalcRefdef (void)
view->model = cl.model_precache[cl.stats[STAT_WEAPON]]; view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
view->frame = cl.stats[STAT_WEAPONFRAME]; view->frame = cl.stats[STAT_WEAPONFRAME];
view->colormap = vid.colormap; view->netstate.colormap = 0;
//johnfitz -- v_gunkick //johnfitz -- v_gunkick
if (v_gunkick.value == 1) //original quake kick if (v_gunkick.value == 1) //original quake kick