mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
Prune dead code.
This commit is contained in:
parent
e6c4e0b576
commit
1478dcd9c9
15 changed files with 25 additions and 95 deletions
|
@ -484,19 +484,17 @@ CL_LerpPoint (void)
|
|||
f = 0.1;
|
||||
}
|
||||
frac = (cl.time - cl.mtime[1]) / f;
|
||||
// Con_Printf ("frac: %f\n",frac);
|
||||
|
||||
if (frac < 0) {
|
||||
if (frac < -0.01) {
|
||||
SetPal (1);
|
||||
cl.time = cl.mtime[1];
|
||||
// Con_Printf ("low frac\n");
|
||||
}
|
||||
frac = 0;
|
||||
} else if (frac > 1) {
|
||||
if (frac > 1.01) {
|
||||
SetPal (2);
|
||||
cl.time = cl.mtime[0];
|
||||
// Con_Printf ("high frac\n");
|
||||
}
|
||||
frac = 1;
|
||||
} else
|
||||
|
|
|
@ -692,7 +692,6 @@ CL_ParseServerMessage (void)
|
|||
break;
|
||||
|
||||
case svc_nop:
|
||||
// Con_Printf ("svc_nop\n");
|
||||
break;
|
||||
|
||||
case svc_time:
|
||||
|
|
|
@ -110,7 +110,6 @@ V_CalcBob (void)
|
|||
|
||||
bob = sqrt (cl.velocity[0] * cl.velocity[0] +
|
||||
cl.velocity[1] * cl.velocity[1]) * cl_bob->value;
|
||||
// Con_Printf ("speed: %5.1f\n", Length(cl.velocity));
|
||||
bob = bob * 0.3 + bob * 0.7 * sin (cycle);
|
||||
if (bob > 4)
|
||||
bob = 4;
|
||||
|
@ -187,8 +186,6 @@ V_DriftPitch (void)
|
|||
move = host_frametime * cl.pitchvel;
|
||||
cl.pitchvel += host_frametime * v_centerspeed->value;
|
||||
|
||||
// Con_Printf ("move: %f (%f)\n", move, host_frametime);
|
||||
|
||||
if (delta > 0) {
|
||||
if (move > delta) {
|
||||
cl.pitchvel = 0;
|
||||
|
|
|
@ -1315,7 +1315,6 @@ PF_rotate_bbox (progs_t *pr)
|
|||
VectorCopy (v[0], ch->mins);
|
||||
VectorCopy (v[0], ch->maxs);
|
||||
for (i = 0; i < 8; i++) {
|
||||
//Con_Printf ("'%0.1f %0.1f %0.1f'\n", v[i][0], v[i][1], v[i][2]);
|
||||
for (j = 0; j < 3; j++) {
|
||||
ch->mins[j] = min (ch->mins[j], v[i][j]);
|
||||
ch->maxs[j] = max (ch->maxs[j], v[i][j]);
|
||||
|
@ -1333,10 +1332,6 @@ PF_rotate_bbox (progs_t *pr)
|
|||
offsets[j]);
|
||||
hull->planes[i].type = 4;
|
||||
VectorCopy (dir[i / 2], hull->planes[i].normal);
|
||||
//Con_Printf ("%f %f %f %f\n",
|
||||
// hull->planes[i].dist,
|
||||
// hull->planes[i].normal[0], hull->planes[i].normal[1],
|
||||
// hull->planes[i].normal[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -482,7 +482,6 @@ SV_ReadClientMessage (void)
|
|||
return false;
|
||||
|
||||
case clc_nop:
|
||||
// Con_Printf ("clc_nop\n");
|
||||
break;
|
||||
|
||||
case clc_stringcmd:
|
||||
|
@ -538,7 +537,6 @@ SV_ReadClientMessage (void)
|
|||
break;
|
||||
|
||||
case clc_disconnect:
|
||||
// Con_Printf ("SV_ReadClientMessage: client disconnected\n");
|
||||
return false;
|
||||
|
||||
case clc_move:
|
||||
|
|
|
@ -478,7 +478,6 @@ adjustang (float current, float ideal, float speed)
|
|||
move = -speed;
|
||||
}
|
||||
|
||||
//Con_Printf("c/i: %4.2f/%4.2f move: %4.2f\n", current, ideal, move);
|
||||
return anglemod (current + move);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -131,8 +131,6 @@ CL_WriteDemoCmd (usercmd_t *pcmd)
|
|||
int i;
|
||||
usercmd_t cmd;
|
||||
|
||||
// Con_Printf("write: %ld bytes, %4.4f\n", msg->cursize, realtime);
|
||||
|
||||
fl = LittleFloat ((float) realtime);
|
||||
Qwrite (cls.demofile, &fl, sizeof (fl));
|
||||
|
||||
|
@ -170,8 +168,6 @@ CL_WriteDemoMessage (sizebuf_t *msg)
|
|||
float fl;
|
||||
int len;
|
||||
|
||||
// Con_Printf("write: %ld bytes, %4.4f\n", msg->cursize, realtime);
|
||||
|
||||
if (!cls.demorecording)
|
||||
return;
|
||||
|
||||
|
@ -277,7 +273,6 @@ CL_GetDemoMessage (void)
|
|||
Qread (cls.demofile, &net_message->message->cursize, 4);
|
||||
net_message->message->cursize = LittleLong
|
||||
(net_message->message->cursize);
|
||||
// Con_Printf("read: %ld bytes\n", net_message->message->cursize);
|
||||
if (net_message->message->cursize > MAX_MSGLEN + 8) //+8 for header
|
||||
Host_Error ("Demo message > MAX_MSGLEN + 8: %d/%d",
|
||||
net_message->message->cursize, MAX_MSGLEN + 8);
|
||||
|
@ -362,8 +357,6 @@ CL_WriteRecordDemoMessage (sizebuf_t *msg, int seq)
|
|||
float fl;
|
||||
int len, i;
|
||||
|
||||
// Con_Printf("write: %ld bytes, %4.4f\n", msg->cursize, realtime);
|
||||
|
||||
if (!cls.demorecording)
|
||||
return;
|
||||
|
||||
|
@ -392,8 +385,6 @@ CL_WriteSetDemoMessage (void)
|
|||
float fl;
|
||||
int len;
|
||||
|
||||
// Con_Printf("write: %ld bytes, %4.4f\n", msg->cursize, realtime);
|
||||
|
||||
if (!cls.demorecording)
|
||||
return;
|
||||
|
||||
|
@ -718,8 +709,8 @@ void
|
|||
CL_Record_f (void)
|
||||
{
|
||||
if (Cmd_Argc () > 2) {
|
||||
/* we use a demo name like year-month-day-hours-minutes-mapname.qwd
|
||||
if there is no argument */
|
||||
// we use a demo name like year-month-day-hours-minutes-mapname.qwd
|
||||
// if there is no argument
|
||||
Con_Printf ("record [demoname]\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -154,9 +154,7 @@ CL_NewDlight (int key, vec3_t org, int effects, byte glow_size,
|
|||
}
|
||||
}
|
||||
|
||||
/* PACKET ENTITY PARSING / LINKING */
|
||||
|
||||
int bitcounts[32]; // / just for protocol profiling
|
||||
// PACKET ENTITY PARSING / LINKING ============================================
|
||||
|
||||
/*
|
||||
CL_ParseDelta
|
||||
|
@ -178,12 +176,6 @@ CL_ParseDelta (entity_state_t *from, entity_state_t *to, int bits)
|
|||
i = MSG_ReadByte (net_message);
|
||||
bits |= i;
|
||||
}
|
||||
// count the bits for net profiling
|
||||
#if 0
|
||||
for (i=0 ; i<16 ; i++)
|
||||
if (bits&(1<<i))
|
||||
bitcounts[i]++;
|
||||
#endif
|
||||
|
||||
// LordHavoc: Endy neglected to mark this as being part of the QSG
|
||||
// version 2 stuff...
|
||||
|
@ -344,7 +336,6 @@ CL_ParsePacketEntities (qboolean delta)
|
|||
|
||||
if (!word) { // copy rest of ents from old packet
|
||||
while (oldindex < oldp->num_entities) {
|
||||
// Con_Printf ("copy %i\n", oldp->entities[oldindex].number);
|
||||
if (newindex >= MAX_PACKET_ENTITIES)
|
||||
Host_Error ("CL_ParsePacketEntities: newindex == "
|
||||
"MAX_PACKET_ENTITIES");
|
||||
|
@ -364,7 +355,6 @@ CL_ParsePacketEntities (qboolean delta)
|
|||
FlushEntityPacket ();
|
||||
return;
|
||||
}
|
||||
// Con_Printf ("copy %i\n", oldnum);
|
||||
// copy one of the old entities over to the new packet unchanged
|
||||
if (newindex >= MAX_PACKET_ENTITIES)
|
||||
Host_Error ("CL_ParsePacketEntities: newindex == "
|
||||
|
@ -377,7 +367,6 @@ CL_ParsePacketEntities (qboolean delta)
|
|||
}
|
||||
|
||||
if (newnum < oldnum) { // new from baseline
|
||||
// Con_Printf ("baseline %i\n", newnum);
|
||||
if (word & U_REMOVE) {
|
||||
if (full) {
|
||||
cl.validsequence = 0;
|
||||
|
@ -408,7 +397,6 @@ CL_ParsePacketEntities (qboolean delta)
|
|||
oldindex++;
|
||||
continue;
|
||||
}
|
||||
// Con_Printf ("delta %i\n", newnum);
|
||||
CL_ParseDelta (&oldp->entities[oldindex],
|
||||
&newp->entities[newindex], word);
|
||||
newindex++;
|
||||
|
|
|
@ -286,14 +286,6 @@ CL_SendConnectPacket (void)
|
|||
|
||||
cls.qport = qport->int_val;
|
||||
|
||||
// Arrgh, this was not in the old binary only release, and eats up
|
||||
// far too much of the 196 chars in the userinfo space, leaving nothing
|
||||
// for player use, thus, its commented out for the moment..
|
||||
//
|
||||
// Info_SetValueForStarKey (cls.userinfo, "*ip", NET_AdrToString(adr),
|
||||
// MAX_INFO_STRING);
|
||||
|
||||
// Con_Printf ("Connecting to %s...\n", cls.servername);
|
||||
snprintf (data, sizeof (data), "%c%c%c%cconnect %i %i %i \"%s\"\n",
|
||||
255, 255, 255, 255, PROTOCOL_VERSION, cls.qport, cls.challenge,
|
||||
Info_MakeString (cls.userinfo, 0));
|
||||
|
@ -816,7 +808,6 @@ CL_NextDemo (void)
|
|||
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
|
||||
cls.demonum = 0;
|
||||
if (!cls.demos[cls.demonum][0]) {
|
||||
// Con_Printf ("No demos listed with startdemos\n");
|
||||
cls.demonum = -1;
|
||||
return;
|
||||
}
|
||||
|
@ -896,7 +887,6 @@ CL_ConnectionlessPacket (void)
|
|||
&& (cl_paranoid->int_val
|
||||
|| !NET_CompareAdr (net_from, cls.server_addr)))
|
||||
Con_Printf ("%s: ", NET_AdrToString (net_from));
|
||||
// Con_DPrintf ("%s", net_message.data + 5);
|
||||
if (c == S2C_CONNECTION) {
|
||||
Con_Printf ("connection\n");
|
||||
if (cls.state >= ca_connected) {
|
||||
|
|
|
@ -467,15 +467,7 @@ CL_ParseDownload (void)
|
|||
net_message->readcount += size;
|
||||
|
||||
if (percent != 100) {
|
||||
// change display routines by zoid
|
||||
// request next block
|
||||
#if 0
|
||||
Con_Printf (".");
|
||||
if (10 * (percent / 10) != cls.downloadpercent) {
|
||||
cls.downloadpercent = 10 * (percent / 10);
|
||||
Con_Printf ("%i%%", cls.downloadpercent);
|
||||
}
|
||||
#endif
|
||||
if (percent != cls.downloadpercent)
|
||||
VID_SetCaption (va ("Downloading %s %d%%", cls.downloadname,
|
||||
percent));
|
||||
|
@ -487,10 +479,6 @@ CL_ParseDownload (void)
|
|||
char oldn[MAX_OSPATH];
|
||||
char newn[MAX_OSPATH];
|
||||
|
||||
#if 0
|
||||
Con_Printf ("100%%\n");
|
||||
#endif
|
||||
|
||||
Qclose (cls.download);
|
||||
VID_SetCaption (va ("Connecting to %s", cls.servername));
|
||||
|
||||
|
@ -517,7 +505,6 @@ CL_ParseDownload (void)
|
|||
cls.downloadpercent = 0;
|
||||
|
||||
// get another file if needed
|
||||
|
||||
CL_RequestNextDownload ();
|
||||
}
|
||||
}
|
||||
|
@ -923,9 +910,7 @@ CL_ParseClientdata (void)
|
|||
// calculate latency
|
||||
latency = frame->receivedtime - frame->senttime;
|
||||
|
||||
if (latency < 0 || latency > 1.0) {
|
||||
// Con_Printf ("Odd latency: %5.2f\n", latency);
|
||||
} else {
|
||||
if (!(latency < 0 || latency > 1.0)) {
|
||||
// drift the average latency towards the observed latency
|
||||
if (latency < cls.latency)
|
||||
cls.latency = latency;
|
||||
|
@ -941,7 +926,7 @@ CL_ProcessUserInfo (int slot, player_info_t *player)
|
|||
const char *s;
|
||||
|
||||
s = Info_ValueForKey (player->userinfo, "skin");
|
||||
COM_StripExtension (s, skin); // FIXME buffer overflow
|
||||
COM_StripExtension (s, skin); // FIXME: buffer overflow
|
||||
if (!strequal (s, skin))
|
||||
Info_SetValueForKey (player->userinfo, "skin", skin, 1);
|
||||
strncpy (player->name, Info_ValueForKey (player->userinfo, "name"),
|
||||
|
@ -965,7 +950,6 @@ CL_ProcessUserInfo (int slot, player_info_t *player)
|
|||
Skin_Find (player);
|
||||
|
||||
Sbar_Changed ();
|
||||
//XXX CL_NewTranslation (slot);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1164,7 +1148,6 @@ CL_ParseServerMessage (void)
|
|||
break;
|
||||
|
||||
case svc_nop:
|
||||
// Con_Printf ("svc_nop\n");
|
||||
break;
|
||||
|
||||
case svc_disconnect:
|
||||
|
@ -1348,11 +1331,12 @@ CL_ParseServerMessage (void)
|
|||
Con_DPrintf ("\n");
|
||||
VectorCopy (vec3_origin, cl.simvel);
|
||||
|
||||
/*
|
||||
/*
|
||||
automatic fraglogging (by elmex)
|
||||
XXX: Should this _really_ called here?
|
||||
XXX: Should this _really_ called here?
|
||||
*/
|
||||
if(!cls.demoplayback) Sbar_LogFrags();
|
||||
if (!cls.demoplayback)
|
||||
Sbar_LogFrags();
|
||||
break;
|
||||
|
||||
case svc_finale:
|
||||
|
|
|
@ -486,9 +486,6 @@ SL_Con_Details (server_entry_t *sldata, int slitemno)
|
|||
playercount++;
|
||||
Con_Printf("Players: %i/%s\n", playercount,
|
||||
Info_ValueForKey(cp->status, "maxclients"));
|
||||
|
||||
// For Debug of Server Info
|
||||
// Con_Printf("%s\n",cp->status);
|
||||
} else
|
||||
Con_Printf("No Details Available\n");
|
||||
}
|
||||
|
|
|
@ -220,8 +220,6 @@ V_DriftPitch (void)
|
|||
move = host_frametime * cl.pitchvel;
|
||||
cl.pitchvel += host_frametime * v_centerspeed->value;
|
||||
|
||||
// Con_Printf ("move: %f (%f)\n", move, host_frametime);
|
||||
|
||||
if (delta > 0) {
|
||||
if (move > delta) {
|
||||
cl.pitchvel = 0;
|
||||
|
|
|
@ -268,12 +268,12 @@ NET_GetPacket (void)
|
|||
Con_DPrintf ("error 10054 from %s\n", NET_AdrToString (net_from));
|
||||
return false;
|
||||
}
|
||||
#else /* _WIN32 */
|
||||
#else // _WIN32
|
||||
int err = errno;
|
||||
|
||||
if (err == ECONNREFUSED)
|
||||
return false;
|
||||
#endif /* _WIN32 */
|
||||
#endif // _WIN32
|
||||
if (err == EWOULDBLOCK)
|
||||
return false;
|
||||
Con_Printf ("NET_GetPacket: %d: %s\n", err, strerror (err));
|
||||
|
@ -315,9 +315,8 @@ NET_SendPacket (int length, void *data, netadr_t to)
|
|||
if (net_packetlog->int_val)
|
||||
Log_Outgoing_Packet(data,length);
|
||||
|
||||
ret =
|
||||
sendto (net_socket, data, length, 0, (struct sockaddr *) &addr,
|
||||
sizeof (addr));
|
||||
ret = sendto (net_socket, data, length, 0, (struct sockaddr *) &addr,
|
||||
sizeof (addr));
|
||||
if (ret == -1) {
|
||||
#ifdef _WIN32
|
||||
int err = WSAGetLastError ();
|
||||
|
@ -328,12 +327,12 @@ NET_SendPacket (int length, void *data, netadr_t to)
|
|||
else
|
||||
Con_Printf ("NET_SendPacket ERROR: %i\n", err);
|
||||
}
|
||||
#else /* _WIN32 */
|
||||
#else // _WIN32
|
||||
int err = errno;
|
||||
|
||||
if (err == ECONNREFUSED)
|
||||
return;
|
||||
#endif /* _WIN32 */
|
||||
#endif // _WIN32
|
||||
if (err == EWOULDBLOCK)
|
||||
return;
|
||||
|
||||
|
|
|
@ -278,12 +278,10 @@ NET_StringToAdr (const char *s, netadr_t *a)
|
|||
}
|
||||
}
|
||||
|
||||
// Con_Printf ("NET_StringToAdr: addrs %s ports %s\n",addrs, ports);
|
||||
|
||||
if ((err = getaddrinfo (addrs, ports, &hints, &resultp))) {
|
||||
// Error
|
||||
Con_Printf ("NET_StringToAdr: string %s:\n%s\n", s, gai_strerror
|
||||
(err));
|
||||
Con_Printf ("NET_StringToAdr: string %s:\n%s\n", s,
|
||||
gai_strerror (err));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -307,11 +305,11 @@ NET_StringToAdr (const char *s, netadr_t *a)
|
|||
|
||||
break;
|
||||
default:
|
||||
Con_Printf
|
||||
("NET_StringToAdr: string %s:\nprotocol family %d not supported\n",
|
||||
s, resultp->ai_family);
|
||||
return 0;
|
||||
Con_Printf ("NET_StringToAdr: string %s:\nprotocol family %d not "
|
||||
"supported\n", s, resultp->ai_family);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SockadrToNetadr ((struct sockaddr_in6 *) &ss, a);
|
||||
|
||||
return true;
|
||||
|
@ -371,12 +369,12 @@ NET_GetPacket (void)
|
|||
NET_AdrToString (net_from));
|
||||
return false;
|
||||
}
|
||||
#else /* _WIN32 */
|
||||
#else // _WIN32
|
||||
int err = errno;
|
||||
|
||||
if (err == ECONNREFUSED)
|
||||
return false;
|
||||
#endif /* _WIN32 */
|
||||
#endif // _WIN32
|
||||
if (err == EWOULDBLOCK)
|
||||
return false;
|
||||
Con_Printf ("NET_GetPacket: %s\n", strerror (err));
|
||||
|
|
|
@ -546,8 +546,7 @@ SV_Physics_Pusher (edict_t *ent)
|
|||
VectorSubtract (SVvector (ent, origin), oldorg, move);
|
||||
|
||||
l = Length (move);
|
||||
if (l > 1.0 / 64) {
|
||||
// Con_Printf ("**** snap: %f\n", Length (l));
|
||||
if (l > (1.0 / 64.0)) {
|
||||
VectorCopy (oldorg, SVvector (ent, origin));
|
||||
SV_Push (ent, move);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue