mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Strip residual sw-specific colormap stuff.
This commit is contained in:
parent
b1f93c7f3d
commit
2e92fbf1d4
5 changed files with 5 additions and 55 deletions
|
@ -196,7 +196,6 @@ entity_t *CL_EntityNum (int num)
|
|||
while (cl.num_entities<=num)
|
||||
{
|
||||
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.num_entities++;
|
||||
}
|
||||
|
@ -531,7 +530,7 @@ static void CLFTE_ParseBaseline(entity_state_t *es)
|
|||
//called with both fte+dp deltas
|
||||
static void CL_EntitiesDeltaed(void)
|
||||
{
|
||||
int i, newnum;
|
||||
int newnum;
|
||||
qmodel_t *model;
|
||||
qboolean forcelink;
|
||||
entity_t *ent;
|
||||
|
@ -554,15 +553,6 @@ static void CL_EntitiesDeltaed(void)
|
|||
|
||||
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;
|
||||
if (skin != ent->skinnum)
|
||||
{
|
||||
|
@ -1506,17 +1496,7 @@ static void CL_ParseUpdate (int bits)
|
|||
ent->frame = ent->baseline.frame;
|
||||
|
||||
if (bits & U_COLORMAP)
|
||||
i = 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;
|
||||
}
|
||||
ent->netstate.colormap = MSG_ReadByte();
|
||||
if (bits & U_SKIN)
|
||||
skin = MSG_ReadByte();
|
||||
else
|
||||
|
@ -1886,37 +1866,9 @@ CL_NewTranslation
|
|||
*/
|
||||
static void CL_NewTranslation (int slot)
|
||||
{
|
||||
int i, j;
|
||||
int top, bottom;
|
||||
byte *dest, *source;
|
||||
|
||||
if (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);
|
||||
|
||||
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->frame = ent->baseline.frame;
|
||||
|
||||
ent->colormap = vid.colormap;
|
||||
ent->skinnum = ent->baseline.skin;
|
||||
ent->effects = ent->baseline.effects;
|
||||
ent->alpha = ent->baseline.alpha; //johnfitz -- alpha
|
||||
|
|
|
@ -520,7 +520,7 @@ entity_t *CL_NewTempEntity (void)
|
|||
|
||||
ent->netstate.scale = 16;
|
||||
ent->netstate.colormod[0] = ent->netstate.colormod[1] = ent->netstate.colormod[2] = 32;
|
||||
ent->colormap = vid.colormap;
|
||||
ent->netstate.colormap = 0;
|
||||
return ent;
|
||||
}
|
||||
|
||||
|
|
|
@ -1137,7 +1137,7 @@ void R_DrawAliasModel (entity_t *e)
|
|||
tx = paliashdr->gltextures[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;
|
||||
if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)
|
||||
|
|
|
@ -65,7 +65,6 @@ typedef struct entity_s
|
|||
struct efrag_s *efrag; // linked list of efrags
|
||||
int frame;
|
||||
float syncbase; // for client-side animations
|
||||
byte *colormap;
|
||||
int effects; // light, particles, etc
|
||||
int skinnum; // for Alias models
|
||||
int visframe; // last frame this entity was
|
||||
|
|
|
@ -857,7 +857,7 @@ void V_CalcRefdef (void)
|
|||
|
||||
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||
view->frame = cl.stats[STAT_WEAPONFRAME];
|
||||
view->colormap = vid.colormap;
|
||||
view->netstate.colormap = 0;
|
||||
|
||||
//johnfitz -- v_gunkick
|
||||
if (v_gunkick.value == 1) //original quake kick
|
||||
|
|
Loading…
Reference in a new issue