mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-26 05:51:36 +00:00
Fix for long standing baseline bug (OUCH!), should fix invis problems...
This commit is contained in:
parent
b0f65051b1
commit
b6484d3f66
2 changed files with 21 additions and 17 deletions
|
@ -257,24 +257,16 @@ void CL_ParseDelta (entity_state_t *from, entity_state_t *to, int bits)
|
||||||
// Ender (QSG - Begin)
|
// Ender (QSG - Begin)
|
||||||
if (bits & U_ALPHA)
|
if (bits & U_ALPHA)
|
||||||
to->alpha = MSG_ReadByte();
|
to->alpha = MSG_ReadByte();
|
||||||
else if (!to->alpha)
|
|
||||||
to->alpha = 1;
|
|
||||||
if (bits & U_SCALE)
|
if (bits & U_SCALE)
|
||||||
to->scale = MSG_ReadByte();
|
to->scale = MSG_ReadByte();
|
||||||
else if (!to->scale)
|
|
||||||
to->scale = 16;
|
|
||||||
if (bits & U_EFFECTS2)
|
if (bits & U_EFFECTS2)
|
||||||
to->effects = (to->effects & 0xFF) | (MSG_ReadByte() << 8);
|
to->effects = (to->effects & 0xFF) | (MSG_ReadByte() << 8);
|
||||||
if (bits & U_GLOWSIZE)
|
if (bits & U_GLOWSIZE)
|
||||||
to->glowsize = MSG_ReadByte();
|
to->glowsize = MSG_ReadByte();
|
||||||
if (bits & U_GLOWCOLOR)
|
if (bits & U_GLOWCOLOR)
|
||||||
to->glowcolor = MSG_ReadByte();
|
to->glowcolor = MSG_ReadByte();
|
||||||
else if (!to->glowcolor)
|
|
||||||
to->glowcolor = 254;
|
|
||||||
if (bits & U_COLORMOD)
|
if (bits & U_COLORMOD)
|
||||||
to->colormod = MSG_ReadByte();
|
to->colormod = MSG_ReadByte();
|
||||||
else if (!to->colormod)
|
|
||||||
to->colormod = 255;
|
|
||||||
if (bits & U_FRAME2)
|
if (bits & U_FRAME2)
|
||||||
to->frame = (to->frame & 0xFF) | (MSG_ReadByte() << 8);
|
to->frame = (to->frame & 0xFF) | (MSG_ReadByte() << 8);
|
||||||
// Ender (QSG - End)
|
// Ender (QSG - End)
|
||||||
|
@ -312,12 +304,6 @@ void FlushEntityPacket (void)
|
||||||
Con_DPrintf ("FlushEntityPacket\n");
|
Con_DPrintf ("FlushEntityPacket\n");
|
||||||
|
|
||||||
memset (&olde, 0, sizeof(olde));
|
memset (&olde, 0, sizeof(olde));
|
||||||
// LordHavoc: more state setup...
|
|
||||||
olde.alpha = 255;
|
|
||||||
olde.scale = 16;
|
|
||||||
olde.glowsize = 0;
|
|
||||||
olde.glowcolor = 254;
|
|
||||||
olde.colormod = 255;
|
|
||||||
|
|
||||||
cl.validsequence = 0; // can't render a frame
|
cl.validsequence = 0; // can't render a frame
|
||||||
cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].invalid = true;
|
cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].invalid = true;
|
||||||
|
@ -729,15 +715,15 @@ void CL_LinkProjectiles (void)
|
||||||
|
|
||||||
for (i=0, pr=cl_projectiles ; i<cl_num_projectiles ; i++, pr++)
|
for (i=0, pr=cl_projectiles ; i<cl_num_projectiles ; i++, pr++)
|
||||||
{
|
{
|
||||||
|
if (pr->modelindex < 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
// grab an entity to fill in
|
// grab an entity to fill in
|
||||||
if (cl_numvisedicts == MAX_VISEDICTS)
|
if (cl_numvisedicts == MAX_VISEDICTS)
|
||||||
break; // object list is full
|
break; // object list is full
|
||||||
ent = &cl_visedicts[cl_numvisedicts];
|
ent = &cl_visedicts[cl_numvisedicts];
|
||||||
cl_numvisedicts++;
|
cl_numvisedicts++;
|
||||||
ent->keynum = 0;
|
ent->keynum = 0;
|
||||||
|
|
||||||
if (pr->modelindex < 1)
|
|
||||||
continue;
|
|
||||||
ent->model = cl.model_precache[pr->modelindex];
|
ent->model = cl.model_precache[pr->modelindex];
|
||||||
ent->skinnum = 0;
|
ent->skinnum = 0;
|
||||||
ent->frame = 0;
|
ent->frame = 0;
|
||||||
|
|
|
@ -544,6 +544,7 @@ void CL_StopUpload(void)
|
||||||
|
|
||||||
void Draw_ClearCache (void);
|
void Draw_ClearCache (void);
|
||||||
|
|
||||||
|
void CL_ClearBaselines(); // LordHavoc: BIG BUG-FIX!
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
CL_ParseServerData
|
CL_ParseServerData
|
||||||
|
@ -649,6 +650,23 @@ void CL_ParseServerData (void)
|
||||||
|
|
||||||
// now waiting for downloads, etc
|
// now waiting for downloads, etc
|
||||||
cls.state = ca_onserver;
|
cls.state = ca_onserver;
|
||||||
|
|
||||||
|
CL_ClearBaselines();
|
||||||
|
}
|
||||||
|
|
||||||
|
// LordHavoc: BIG BUG-FIX! Clear baselines each time it connects...
|
||||||
|
void CL_ClearBaselines()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
memset(cl_baselines, 0, sizeof(cl_baselines));
|
||||||
|
for (i = 0;i < MAX_EDICTS;i++)
|
||||||
|
{
|
||||||
|
cl_baselines[i].alpha = 255;
|
||||||
|
cl_baselines[i].scale = 16;
|
||||||
|
cl_baselines[i].glowcolor = 254;
|
||||||
|
cl_baselines[i].glowsize = 0;
|
||||||
|
cl_baselines[i].colormod = 255;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue