New network protocol
This commit is contained in:
parent
adf7dcc155
commit
8908e5908e
1 changed files with 29 additions and 12 deletions
41
cl_parse.c
41
cl_parse.c
|
@ -354,6 +354,12 @@ void CL_ParseUpdate (int bits)
|
|||
bits |= (i<<8);
|
||||
}
|
||||
|
||||
if (bits & U_TENEBRAEBITS)
|
||||
{
|
||||
i = MSG_ReadShort ();
|
||||
bits |= (i<<16);
|
||||
}
|
||||
|
||||
if (bits & U_LONGENTITY)
|
||||
num = MSG_ReadShort ();
|
||||
else
|
||||
|
@ -483,28 +489,39 @@ if (bits&(1<<i))
|
|||
if ( bits & U_NOLERP )
|
||||
ent->forcelink = true;
|
||||
|
||||
//PENTA: more baseline fields
|
||||
if (bits & U_MOREDATA) {
|
||||
//Con_Printf("parsemoredata\n");
|
||||
ent->alpha = MSG_ReadByte () / 255.0;
|
||||
ent->style = MSG_ReadByte ();
|
||||
ent->light_lev = MSG_ReadShort ();
|
||||
ent->pflags = MSG_ReadByte();
|
||||
//PENTA: new baseline fields
|
||||
if (bits & U_COLOR) {
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
ent->color[i] = MSG_ReadByte() / 255.0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ent->alpha = ent->baseline.alpha;
|
||||
ent->style = ent->baseline.style;
|
||||
ent->light_lev = ent->baseline.light_lev;
|
||||
ent->pflags = ent->baseline.pflags;
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
ent->color[i] = ent->baseline.color[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (bits & U_ALPHA)
|
||||
ent->alpha = MSG_ReadByte () / 255.0;
|
||||
else
|
||||
ent->alpha = ent->baseline.alpha;
|
||||
|
||||
if (bits & U_LIGHTLEV)
|
||||
ent->light_lev = MSG_ReadShort ();
|
||||
else
|
||||
ent->light_lev = ent->baseline.light_lev;
|
||||
|
||||
if (bits & U_STYLE)
|
||||
ent->style = MSG_ReadByte ();
|
||||
else
|
||||
ent->style = ent->baseline.style;
|
||||
|
||||
if (bits & U_PFLAGS)
|
||||
ent->pflags = MSG_ReadByte();
|
||||
else
|
||||
ent->pflags = ent->baseline.pflags;
|
||||
|
||||
if ( forcelink )
|
||||
{ // didn't have an update last message
|
||||
VectorCopy (ent->msg_origins[0], ent->msg_origins[1]);
|
||||
|
|
Loading…
Reference in a new issue