Whitespace, prune dead code.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2002-07-07 02:33:00 +00:00
parent caf9d820c1
commit 6cef69545e
5 changed files with 35 additions and 56 deletions

View file

@ -735,8 +735,6 @@ DropPunchAngle (void)
void
V_RenderView (void)
{
// if (cl.simangles[ROLL])
// Sys_Error ("cl.simangles[ROLL]"); // DEBUG
cl.simangles[ROLL] = 0; // FIXME @@@
if (cls.state != ca_active)

View file

@ -70,7 +70,6 @@ MSG_WriteDeltaUsercmd (sizebuf_t *buf, usercmd_t *from, usercmd_t *cmd)
bits |= CM_BUTTONS;
if (cmd->impulse != from->impulse)
bits |= CM_IMPULSE;
MSG_WriteByte (buf, bits);
if (bits & CM_ANGLE1)

View file

@ -157,7 +157,6 @@ Netchan_OutOfBand (netadr_t adr, int length, byte * data)
NET_SendPacket (send.cursize, send.data, adr);
} else
NET_SendPacket (send.cursize, send.data, adr);
}
/*
@ -175,7 +174,6 @@ Netchan_OutOfBandPrint (netadr_t adr, const char *format, ...)
vsnprintf (string, sizeof (string), format, argptr);
va_end (argptr);
Netchan_OutOfBand (adr, strlen (string), (byte *) string);
}
@ -361,7 +359,7 @@ Netchan_Process (netchan_t *chan)
sequence_ack, reliable_ack, net_message->message->cursize);
// get a rate estimation
#if 0
#if 0 // FIXME: Dead code
if (chan->outgoing_sequence - sequence_ack < MAX_LATENT) {
int i;
double time, rate;
@ -404,8 +402,7 @@ Netchan_Process (netchan_t *chan)
if (showdrop->int_val)
Con_Printf ("%s:Dropped %i packets at %i\n",
NET_AdrToString (chan->remote_address),
sequence - (chan->incoming_sequence + 1)
, sequence);
sequence - (chan->incoming_sequence + 1), sequence);
}
// if the current outgoing reliable message has been acknowledged

View file

@ -333,64 +333,54 @@ Log_Delta(int bits)
to.flags = bits;
if (bits & U_MODEL)
Net_LogPrintf (" MdlIdx: %d", MSG_ReadByte (&packet));
if (bits & U_FRAME) {
to.frame = MSG_ReadByte (&packet);
Net_LogPrintf (" Frame: %d", to.frame);
}
Net_LogPrintf (" MdlIdx: %d", MSG_ReadByte (&packet));
if (bits & U_FRAME) {
to.frame = MSG_ReadByte (&packet);
Net_LogPrintf (" Frame: %d", to.frame);
}
if (bits & U_COLORMAP)
Net_LogPrintf (" Colormap: %d", MSG_ReadByte (&packet));
Net_LogPrintf (" Colormap: %d", MSG_ReadByte (&packet));
if (bits & U_SKIN)
Net_LogPrintf (" Skinnum: %d", MSG_ReadByte (&packet));
if (bits & U_EFFECTS) {
to.effects = MSG_ReadByte (&packet);
Net_LogPrintf (" Effects: %d", to.effects);
}
Net_LogPrintf (" Skinnum: %d", MSG_ReadByte (&packet));
if (bits & U_EFFECTS) {
to.effects = MSG_ReadByte (&packet);
Net_LogPrintf (" Effects: %d", to.effects);
}
if (bits & U_ORIGIN1)
Net_LogPrintf (" X: %f", MSG_ReadCoord (&packet));
Net_LogPrintf (" X: %f", MSG_ReadCoord (&packet));
if (bits & U_ANGLE1)
Net_LogPrintf (" Pitch: %d", MSG_ReadAngle (&packet));
Net_LogPrintf (" Pitch: %d", MSG_ReadAngle (&packet));
if (bits & U_ORIGIN2)
Net_LogPrintf (" Y: %f", MSG_ReadCoord (&packet));
Net_LogPrintf (" Y: %f", MSG_ReadCoord (&packet));
if (bits & U_ANGLE2)
Net_LogPrintf (" Yaw: %d", MSG_ReadAngle (&packet));
Net_LogPrintf (" Yaw: %d", MSG_ReadAngle (&packet));
if (bits & U_ORIGIN3)
Net_LogPrintf (" Z: %f", MSG_ReadCoord (&packet));
Net_LogPrintf (" Z: %f", MSG_ReadCoord (&packet));
if (bits & U_ANGLE3)
Net_LogPrintf (" Roll: %d", MSG_ReadAngle (&packet));
Net_LogPrintf (" Roll: %d", MSG_ReadAngle (&packet));
// Ender (QSG - Begin)
if (bits & U_ALPHA)
Net_LogPrintf(" Alpha: %d", MSG_ReadByte (&packet));
Net_LogPrintf(" Alpha: %d", MSG_ReadByte (&packet));
if (bits & U_SCALE)
Net_LogPrintf(" Scale: %d", MSG_ReadByte (&packet));
Net_LogPrintf(" Scale: %d", MSG_ReadByte (&packet));
if (bits & U_EFFECTS2)
Net_LogPrintf(" U_EFFECTS2: %d", (to.effects & 0xFF) | (MSG_ReadByte (&packet) << 8));
Net_LogPrintf(" U_EFFECTS2: %d", (to.effects & 0xFF) |
(MSG_ReadByte (&packet) << 8));
if (bits & U_GLOWSIZE)
Net_LogPrintf(" GlowSize: %d", MSG_ReadByte (&packet));
Net_LogPrintf(" GlowSize: %d", MSG_ReadByte (&packet));
if (bits & U_GLOWCOLOR)
Net_LogPrintf(" ColorGlow: %d", MSG_ReadByte (&packet));
Net_LogPrintf(" ColorGlow: %d", MSG_ReadByte (&packet));
if (bits & U_COLORMOD)
Net_LogPrintf(" Colormod: %d", MSG_ReadByte (&packet));
Net_LogPrintf(" Colormod: %d", MSG_ReadByte (&packet));
if (bits & U_FRAME2)
Net_LogPrintf(" Uframe2: %d", ((to.frame & 0xFF) | (MSG_ReadByte (&packet) << 8)));
Net_LogPrintf(" Uframe2: %d", ((to.frame & 0xFF) |
(MSG_ReadByte (&packet) << 8)));
// Ender (QSG - End)
return;
return;
}
void
Analyze_Server_Packet (const byte * data, int len)
{
@ -418,7 +408,6 @@ Parse_Server_Packet ()
if (seq1 == -1) {
Net_LogPrintf ("Special Packet");
} else {
seq2 = MSG_ReadLong (&packet);
// FIXME: display seqs right when reliable
@ -437,12 +426,10 @@ Parse_Server_Packet ()
c = MSG_ReadByte (&packet);
if (c == -1)
break;
// Net_LogPrintf("\n<%ld,%ld> ",seq1 & 0x7FFFFFFF,seq2 & 0x7FFFFFFF);
Net_LogPrintf ("<%06x> [0x%02x] ", MSG_GetReadCount (&packet), c);
if (c < 53)
Net_LogPrintf ("%s: ", svc_string[c]);
// else Net_LogPrintf("(UNK: %d): ",c);
if (MSG_GetReadCount (&packet) > packet.message->cursize)
return;
@ -867,10 +854,6 @@ Parse_Client_Packet (void)
Net_LogPrintf ("\nSeq: %ld Ack: %ld ", seq1 & 0x7FFFFFFF,
seq2 & 0x7FFFFFFF);
/*
if ((seq1 >>31) &0x01) Net_LogPrintf("CL_REL ");
if ((seq2 >>31) &0x01) Net_LogPrintf("CL_RELACK ");
*/
Net_LogPrintf ("QP: %u\n", MSG_ReadShort (&packet));
@ -880,7 +863,6 @@ Parse_Client_Packet (void)
c = MSG_ReadByte (&packet);
if (c == -1)
break;
// Net_LogPrintf("<%ld,%ld> ",seq1 & 0x7FFFFFFF,seq2 & 0x7FFFFFFF);
Net_LogPrintf ("\n<%06x> [0x%02x] ", MSG_GetReadCount (&packet),
c);
if (c < 8)

View file

@ -1000,9 +1000,12 @@ NET_SVC_Nails_Parse (net_svc_nails_t *block, msg_t *msg)
// [48 bits] xyzpy 12 12 12 4 8
// format is 12 bits per origin coord, 4 for angles[0],
// 8 for angles[1], and 0 for angles[2]
block->nails[i].origin[0] = ((bits[0] + ((bits[1] & 15) << 8)) << 1) - 4096;
block->nails[i].origin[1] = (((bits[1] >> 4) + (bits[2] << 4)) << 1) - 4096;
block->nails[i].origin[2] = ((bits[3] + ((bits[4] & 15) << 8)) << 1) - 4096;
block->nails[i].origin[0] = ((bits[0] + ((bits[1] & 15) << 8)) << 1) -
4096;
block->nails[i].origin[1] = (((bits[1] >> 4) + (bits[2] << 4)) << 1) -
4096;
block->nails[i].origin[2] = ((bits[3] + ((bits[4] & 15) << 8)) << 1) -
4096;
block->nails[i].angles[0] = 360 * (bits[4] >> 4) / 16;
block->nails[i].angles[1] = 360 * bits[5] / 256;
block->nails[i].angles[2] = 0;