mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
rename the Con_Printf in sv_send.c to SV_Printf and change all the calls to
Con_Printf in the server code to SV_Printf. nuke Con_DPrintf from sv_send.c
This commit is contained in:
parent
654448a6cd
commit
7a06a2254a
15 changed files with 210 additions and 226 deletions
|
@ -472,6 +472,7 @@ void SV_SetMoveVars(void);
|
|||
//
|
||||
// sv_send.c
|
||||
//
|
||||
void SV_Printf (char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void SV_SendClientMessages (void);
|
||||
|
||||
void SV_Multicast (vec3_t origin, int to);
|
||||
|
|
|
@ -69,7 +69,7 @@ SV_Match_User (const char *substr, int *uidp)
|
|||
|
||||
if (!substr[0]) {
|
||||
*uidp = 0;
|
||||
Con_Printf ("Too many matches, ignoring command!\n");
|
||||
SV_Printf ("Too many matches, ignoring command!\n");
|
||||
return false;
|
||||
}
|
||||
for (i = 0, cl = svs.clients; i < MAX_CLIENTS; i++, cl++) {
|
||||
|
@ -83,7 +83,7 @@ SV_Match_User (const char *substr, int *uidp)
|
|||
if (!substr[j]) { // found a match;
|
||||
*uidp = cl->userid;
|
||||
count++;
|
||||
Con_Printf ("User %04d matches with name: %s\n",
|
||||
SV_Printf ("User %04d matches with name: %s\n",
|
||||
*uidp, cl->name);
|
||||
str = 0;
|
||||
} else {
|
||||
|
@ -93,7 +93,7 @@ SV_Match_User (const char *substr, int *uidp)
|
|||
}
|
||||
if (count > 1) {
|
||||
*uidp = 0;
|
||||
Con_Printf ("Too many matches, ignoring command!\n");
|
||||
SV_Printf ("Too many matches, ignoring command!\n");
|
||||
}
|
||||
if (count)
|
||||
return true;
|
||||
|
@ -123,16 +123,16 @@ SV_SetMaster_f (void)
|
|||
for (i = 1; i < Cmd_Argc (); i++) {
|
||||
if (!strcmp (Cmd_Argv (i), "none")
|
||||
|| !NET_StringToAdr (Cmd_Argv (i), &master_adr[i - 1])) {
|
||||
Con_Printf ("Setting nomaster mode.\n");
|
||||
SV_Printf ("Setting nomaster mode.\n");
|
||||
return;
|
||||
}
|
||||
if (master_adr[i - 1].port == 0)
|
||||
master_adr[i - 1].port = BigShort (27000);
|
||||
|
||||
Con_Printf ("Master server at %s\n",
|
||||
SV_Printf ("Master server at %s\n",
|
||||
NET_AdrToString (master_adr[i - 1]));
|
||||
|
||||
Con_Printf ("Sending a ping.\n");
|
||||
SV_Printf ("Sending a ping.\n");
|
||||
|
||||
data[0] = A2A_PING;
|
||||
data[1] = 0;
|
||||
|
@ -150,7 +150,7 @@ void
|
|||
SV_Quit_f (void)
|
||||
{
|
||||
SV_FinalMessage ("server shutdown\n");
|
||||
Con_Printf ("Shutting down.\n");
|
||||
SV_Printf ("Shutting down.\n");
|
||||
SV_Shutdown ();
|
||||
Sys_Quit ();
|
||||
}
|
||||
|
@ -164,17 +164,17 @@ SV_Logfile_f (void)
|
|||
char name[MAX_OSPATH];
|
||||
|
||||
if (sv_logfile) {
|
||||
Con_Printf ("File logging off.\n");
|
||||
SV_Printf ("File logging off.\n");
|
||||
Qclose (sv_logfile);
|
||||
sv_logfile = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
snprintf (name, sizeof (name), "%s/qconsole.log", com_gamedir);
|
||||
Con_Printf ("Logging text to %s.\n", name);
|
||||
SV_Printf ("Logging text to %s.\n", name);
|
||||
sv_logfile = Qopen (name, "w");
|
||||
if (!sv_logfile)
|
||||
Con_Printf ("failed.\n");
|
||||
SV_Printf ("failed.\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -188,7 +188,7 @@ SV_Fraglogfile_f (void)
|
|||
int i;
|
||||
|
||||
if (sv_fraglogfile) {
|
||||
Con_Printf ("Frag file logging off.\n");
|
||||
SV_Printf ("Frag file logging off.\n");
|
||||
Qclose (sv_fraglogfile);
|
||||
sv_fraglogfile = NULL;
|
||||
return;
|
||||
|
@ -206,12 +206,12 @@ SV_Fraglogfile_f (void)
|
|||
Qclose (sv_fraglogfile);
|
||||
}
|
||||
if (i == 1000) {
|
||||
Con_Printf ("Can't open any logfiles.\n");
|
||||
SV_Printf ("Can't open any logfiles.\n");
|
||||
sv_fraglogfile = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
Con_Printf ("Logging frags to %s.\n", name);
|
||||
SV_Printf ("Logging frags to %s.\n", name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -238,7 +238,7 @@ SV_SetPlayer (void)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
Con_Printf ("Userid %i is not on the server\n", idnum);
|
||||
SV_Printf ("Userid %i is not on the server\n", idnum);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ void
|
|||
SV_God_f (void)
|
||||
{
|
||||
if (!sv_allow_cheats) {
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("You must run the server with -cheats to enable this command.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ void
|
|||
SV_Noclip_f (void)
|
||||
{
|
||||
if (!sv_allow_cheats) {
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("You must run the server with -cheats to enable this command.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ SV_Give_f (void)
|
|||
int v;
|
||||
|
||||
if (!sv_allow_cheats) {
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("You must run the server with -cheats to enable this command.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -360,11 +360,11 @@ SV_Map_f (void)
|
|||
VFile *f;
|
||||
|
||||
if (Cmd_Argc () > 2) {
|
||||
Con_Printf ("map <levelname> : continue game on a new level\n");
|
||||
SV_Printf ("map <levelname> : continue game on a new level\n");
|
||||
return;
|
||||
}
|
||||
if (Cmd_Argc () == 1) {
|
||||
Con_Printf ("map is %s\n", curlevel);
|
||||
SV_Printf ("map is %s\n", curlevel);
|
||||
return;
|
||||
}
|
||||
strncpy (level, Cmd_Argv (1), sizeof (level) - 1);
|
||||
|
@ -374,7 +374,7 @@ SV_Map_f (void)
|
|||
snprintf (expanded, sizeof (expanded), "maps/%s.bsp", level);
|
||||
COM_FOpenFile (expanded, &f);
|
||||
if (!f) {
|
||||
Con_Printf ("Can't find %s\n", expanded);
|
||||
SV_Printf ("Can't find %s\n", expanded);
|
||||
// If curlevel == level, something is SCREWED! --KB
|
||||
if (strcaseequal (level, curlevel))
|
||||
SV_Error ("map: cannot restart level\n");
|
||||
|
@ -408,7 +408,7 @@ SV_Kick_f (void)
|
|||
int uid;
|
||||
|
||||
if (Cmd_Argc () != 2) {
|
||||
Con_Printf ("usage: kick <name/userid>\n");
|
||||
SV_Printf ("usage: kick <name/userid>\n");
|
||||
return;
|
||||
}
|
||||
if (SV_Match_User (Cmd_Argv(1), &uid)) {
|
||||
|
@ -431,7 +431,7 @@ SV_Kick_f (void)
|
|||
}
|
||||
}
|
||||
|
||||
Con_Printf ("Couldn't find user number %i\n", uid);
|
||||
SV_Printf ("Couldn't find user number %i\n", uid);
|
||||
}
|
||||
|
||||
|
||||
|
@ -453,84 +453,84 @@ SV_Status_f (void)
|
|||
avg = 1000 * svs.stats.latched_active / STATFRAMES;
|
||||
pak = (float) svs.stats.latched_packets / STATFRAMES;
|
||||
|
||||
Con_Printf ("net address : %s\n", NET_AdrToString (net_local_adr));
|
||||
Con_Printf ("cpu utilization : %3i%%\n", (int) cpu);
|
||||
Con_Printf ("avg response time: %i ms\n", (int) avg);
|
||||
Con_Printf ("packets/frame : %5.2f\n", pak);
|
||||
SV_Printf ("net address : %s\n", NET_AdrToString (net_local_adr));
|
||||
SV_Printf ("cpu utilization : %3i%%\n", (int) cpu);
|
||||
SV_Printf ("avg response time: %i ms\n", (int) avg);
|
||||
SV_Printf ("packets/frame : %5.2f\n", pak);
|
||||
|
||||
// min fps lat drp
|
||||
if (sv_redirected != RD_NONE) {
|
||||
// most remote clients are 40 columns
|
||||
// 0123456789012345678901234567890123456789
|
||||
Con_Printf ("name userid frags\n");
|
||||
Con_Printf (" address rate ping drop\n");
|
||||
Con_Printf (" ---------------- ---- ---- -----\n");
|
||||
SV_Printf ("name userid frags\n");
|
||||
SV_Printf (" address rate ping drop\n");
|
||||
SV_Printf (" ---------------- ---- ---- -----\n");
|
||||
for (i = 0, cl = svs.clients; i < MAX_CLIENTS; i++, cl++) {
|
||||
if (!cl->state)
|
||||
continue;
|
||||
|
||||
Con_Printf ("%-16.16s ", cl->name);
|
||||
SV_Printf ("%-16.16s ", cl->name);
|
||||
|
||||
Con_Printf ("%6i %5i", cl->userid, (int) SVFIELD (cl->edict, frags, float));
|
||||
SV_Printf ("%6i %5i", cl->userid, (int) SVFIELD (cl->edict, frags, float));
|
||||
if (cl->spectator)
|
||||
Con_Printf (" (s)\n");
|
||||
SV_Printf (" (s)\n");
|
||||
else
|
||||
Con_Printf ("\n");
|
||||
SV_Printf ("\n");
|
||||
|
||||
s = NET_BaseAdrToString (cl->netchan.remote_address);
|
||||
Con_Printf (" %-16.16s", s);
|
||||
SV_Printf (" %-16.16s", s);
|
||||
if (cl->state == cs_connected) {
|
||||
Con_Printf ("CONNECTING\n");
|
||||
SV_Printf ("CONNECTING\n");
|
||||
continue;
|
||||
}
|
||||
if (cl->state == cs_zombie) {
|
||||
Con_Printf ("ZOMBIE\n");
|
||||
SV_Printf ("ZOMBIE\n");
|
||||
continue;
|
||||
}
|
||||
Con_Printf ("%4i %4i %5.2f\n", (int) (1000 * cl->netchan.frame_rate)
|
||||
SV_Printf ("%4i %4i %5.2f\n", (int) (1000 * cl->netchan.frame_rate)
|
||||
, (int) SV_CalcPing (cl)
|
||||
,
|
||||
100.0 * cl->netchan.drop_count /
|
||||
cl->netchan.incoming_sequence);
|
||||
}
|
||||
} else {
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("frags userid address name rate ping drop qport\n");
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("----- ------ --------------- --------------- ---- ---- ----- -----\n");
|
||||
for (i = 0, cl = svs.clients; i < MAX_CLIENTS; i++, cl++) {
|
||||
if (!cl->state)
|
||||
continue;
|
||||
Con_Printf ("%5i %6i ", (int) SVFIELD (cl->edict, frags, float), cl->userid);
|
||||
SV_Printf ("%5i %6i ", (int) SVFIELD (cl->edict, frags, float), cl->userid);
|
||||
|
||||
s = NET_BaseAdrToString (cl->netchan.remote_address);
|
||||
|
||||
Con_Printf ("%-15.15s ", s);
|
||||
SV_Printf ("%-15.15s ", s);
|
||||
|
||||
Con_Printf ("%-15.15s ", cl->name);
|
||||
SV_Printf ("%-15.15s ", cl->name);
|
||||
|
||||
if (cl->state == cs_connected) {
|
||||
Con_Printf ("CONNECTING\n");
|
||||
SV_Printf ("CONNECTING\n");
|
||||
continue;
|
||||
}
|
||||
if (cl->state == cs_zombie) {
|
||||
Con_Printf ("ZOMBIE\n");
|
||||
SV_Printf ("ZOMBIE\n");
|
||||
continue;
|
||||
}
|
||||
Con_Printf ("%4i %4i %3.1f %4i",
|
||||
SV_Printf ("%4i %4i %3.1f %4i",
|
||||
(int) (1000 * cl->netchan.frame_rate),
|
||||
(int) SV_CalcPing (cl),
|
||||
100.0 * cl->netchan.drop_count /
|
||||
cl->netchan.incoming_sequence, cl->netchan.qport);
|
||||
if (cl->spectator)
|
||||
Con_Printf (" (s)\n");
|
||||
SV_Printf (" (s)\n");
|
||||
else
|
||||
Con_Printf ("\n");
|
||||
SV_Printf ("\n");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Con_Printf ("\n");
|
||||
SV_Printf ("\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -543,7 +543,7 @@ SV_Tell (const char *prefix)
|
|||
char text[512];
|
||||
|
||||
if (Cmd_Argc () < 3) {
|
||||
Con_Printf ("usage: tell <name/userid> <text...>\n");
|
||||
SV_Printf ("usage: tell <name/userid> <text...>\n");
|
||||
return;
|
||||
}
|
||||
if (SV_Match_User (Cmd_Argv(1), &uid)) {
|
||||
|
@ -575,7 +575,7 @@ SV_Tell (const char *prefix)
|
|||
return;
|
||||
}
|
||||
}
|
||||
Con_Printf ("Couldn't find user %s\n", Cmd_Argv(1));
|
||||
SV_Printf ("Couldn't find user %s\n", Cmd_Argv(1));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -673,18 +673,18 @@ SV_Serverinfo_f (void)
|
|||
cvar_t *var;
|
||||
|
||||
if (Cmd_Argc () == 1) {
|
||||
Con_Printf ("Server info settings:\n");
|
||||
SV_Printf ("Server info settings:\n");
|
||||
Info_Print (svs.info);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_Argc () != 3) {
|
||||
Con_Printf ("usage: serverinfo [ <key> <value> ]\n");
|
||||
SV_Printf ("usage: serverinfo [ <key> <value> ]\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_Argv (1)[0] == '*') {
|
||||
Con_Printf ("Star variables cannot be changed.\n");
|
||||
SV_Printf ("Star variables cannot be changed.\n");
|
||||
return;
|
||||
}
|
||||
Info_SetValueForKey (svs.info, Cmd_Argv (1), Cmd_Argv (2),
|
||||
|
@ -711,18 +711,18 @@ void
|
|||
SV_Localinfo_f (void)
|
||||
{
|
||||
if (Cmd_Argc () == 1) {
|
||||
Con_Printf ("Local info settings:\n");
|
||||
SV_Printf ("Local info settings:\n");
|
||||
Info_Print (localinfo);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_Argc () != 3) {
|
||||
Con_Printf ("usage: localinfo [ <key> <value> ]\n");
|
||||
SV_Printf ("usage: localinfo [ <key> <value> ]\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_Argv (1)[0] == '*') {
|
||||
Con_Printf ("Star variables cannot be changed.\n");
|
||||
SV_Printf ("Star variables cannot be changed.\n");
|
||||
return;
|
||||
}
|
||||
Info_SetValueForKey (localinfo, Cmd_Argv (1), Cmd_Argv (2),
|
||||
|
@ -739,7 +739,7 @@ void
|
|||
SV_User_f (void)
|
||||
{
|
||||
if (Cmd_Argc () != 2) {
|
||||
Con_Printf ("Usage: user <userid>\n");
|
||||
SV_Printf ("Usage: user <userid>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -760,13 +760,13 @@ SV_Gamedir (void)
|
|||
char *dir;
|
||||
|
||||
if (Cmd_Argc () == 1) {
|
||||
Con_Printf ("Current *gamedir: %s\n",
|
||||
SV_Printf ("Current *gamedir: %s\n",
|
||||
Info_ValueForKey (svs.info, "*gamedir"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_Argc () != 2) {
|
||||
Con_Printf ("Usage: sv_gamedir <newgamedir>\n");
|
||||
SV_Printf ("Usage: sv_gamedir <newgamedir>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -774,7 +774,7 @@ SV_Gamedir (void)
|
|||
|
||||
if (strstr (dir, "..") || strstr (dir, "/")
|
||||
|| strstr (dir, "\\") || strstr (dir, ":")) {
|
||||
Con_Printf ("*Gamedir should be a single filename, not a path\n");
|
||||
SV_Printf ("*Gamedir should be a single filename, not a path\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -794,18 +794,18 @@ SV_Floodprot_f (void)
|
|||
|
||||
if (Cmd_Argc () == 1) {
|
||||
if (fp_messages) {
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("Current floodprot settings: \nAfter %d msgs per %d seconds, silence for %d seconds\n",
|
||||
fp_messages, fp_persecond, fp_secondsdead);
|
||||
return;
|
||||
} else
|
||||
Con_Printf ("No floodprots enabled.\n");
|
||||
SV_Printf ("No floodprots enabled.\n");
|
||||
}
|
||||
|
||||
if (Cmd_Argc () != 4) {
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("Usage: floodprot <# of messages> <per # of seconds> <seconds to silence>\n");
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("Use floodprotmsg to set a custom message to say to the flooder.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -815,12 +815,12 @@ SV_Floodprot_f (void)
|
|||
arg3 = atoi (Cmd_Argv (3));
|
||||
|
||||
if (arg1 <= 0 || arg2 <= 0 || arg3 <= 0) {
|
||||
Con_Printf ("All values must be positive numbers\n");
|
||||
SV_Printf ("All values must be positive numbers\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg1 > 10) {
|
||||
Con_Printf ("Can only track up to 10 messages.\n");
|
||||
SV_Printf ("Can only track up to 10 messages.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -833,10 +833,10 @@ void
|
|||
SV_Floodprotmsg_f (void)
|
||||
{
|
||||
if (Cmd_Argc () == 1) {
|
||||
Con_Printf ("Current msg: %s\n", fp_msg);
|
||||
SV_Printf ("Current msg: %s\n", fp_msg);
|
||||
return;
|
||||
} else if (Cmd_Argc () != 2) {
|
||||
Con_Printf ("Usage: floodprotmsg \"<message>\"\n");
|
||||
SV_Printf ("Usage: floodprotmsg \"<message>\"\n");
|
||||
return;
|
||||
}
|
||||
snprintf (fp_msg, sizeof (fp_msg), "%s", Cmd_Argv (1));
|
||||
|
@ -860,7 +860,7 @@ SV_Snap (int uid)
|
|||
break;
|
||||
}
|
||||
if (i >= MAX_CLIENTS) {
|
||||
Con_Printf ("userid not found\n");
|
||||
SV_Printf ("userid not found\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -878,7 +878,7 @@ SV_Snap (int uid)
|
|||
break; // file doesn't exist
|
||||
}
|
||||
if (i == 100) {
|
||||
Con_Printf ("Snap: Couldn't create a file, clean some out.\n");
|
||||
SV_Printf ("Snap: Couldn't create a file, clean some out.\n");
|
||||
return;
|
||||
}
|
||||
strcpy (cl->uploadfn, checkname);
|
||||
|
@ -891,7 +891,7 @@ SV_Snap (int uid)
|
|||
|
||||
ClientReliableWrite_Begin (cl, svc_stufftext, 24);
|
||||
ClientReliableWrite_String (cl, "cmd snap\n");
|
||||
Con_Printf ("Requesting snap from user %d...\n", uid);
|
||||
SV_Printf ("Requesting snap from user %d...\n", uid);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -903,7 +903,7 @@ SV_Snap_f (void)
|
|||
int uid;
|
||||
|
||||
if (Cmd_Argc () != 2) {
|
||||
Con_Printf ("Usage: snap <userid>\n");
|
||||
SV_Printf ("Usage: snap <userid>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
#include "QF/qtypes.h"
|
||||
#include "QF/sys.h"
|
||||
|
||||
#include "server.h"
|
||||
|
||||
static WINDOW *output;
|
||||
static WINDOW *status;
|
||||
static WINDOW *input;
|
||||
|
@ -181,7 +183,7 @@ Con_ProcessInput (void)
|
|||
Cbuf_AddText (key_lines[edit_line] + 1);
|
||||
Cbuf_AddText ("\n");
|
||||
no_lf:
|
||||
Con_Printf ("%s\n", key_lines[edit_line]);
|
||||
SV_Printf ("%s\n", key_lines[edit_line]);
|
||||
edit_line = (edit_line + 1) & 31;
|
||||
history_line = edit_line;
|
||||
key_lines[edit_line][0] = ']';
|
||||
|
@ -358,24 +360,24 @@ Con_CompleteCommandLine (void)
|
|||
cmd_len++;
|
||||
} while (i == 3);
|
||||
// 'quakebar'
|
||||
Con_Printf("\n\35");
|
||||
SV_Printf("\n\35");
|
||||
for (i = 0; i < screen_x - 4; i++)
|
||||
Con_Printf("\36");
|
||||
Con_Printf("\37\n");
|
||||
SV_Printf("\36");
|
||||
SV_Printf("\37\n");
|
||||
|
||||
// Print Possible Commands
|
||||
if (c) {
|
||||
Con_Printf("%i possible command%s\n", c, (c > 1) ? "s: " : ":");
|
||||
SV_Printf("%i possible command%s\n", c, (c > 1) ? "s: " : ":");
|
||||
Con_DisplayList(list[0], screen_x);
|
||||
}
|
||||
|
||||
if (v) {
|
||||
Con_Printf("%i possible variable%s\n", v, (v > 1) ? "s: " : ":");
|
||||
SV_Printf("%i possible variable%s\n", v, (v > 1) ? "s: " : ":");
|
||||
Con_DisplayList(list[1], screen_x);
|
||||
}
|
||||
|
||||
if (a) {
|
||||
Con_Printf("%i possible aliases%s\n", a, (a > 1) ? "s: " : ":");
|
||||
SV_Printf("%i possible aliases%s\n", a, (a > 1) ? "s: " : ":");
|
||||
Con_DisplayList(list[2], screen_x);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -338,7 +338,7 @@ SV_EmitPacketEntities (client_t *client, packet_entities_t *to, sizebuf_t *msg)
|
|||
|
||||
newindex = 0;
|
||||
oldindex = 0;
|
||||
//Con_Printf ("---%i to %i ----\n", client->delta_sequence & UPDATE_MASK
|
||||
//SV_Printf ("---%i to %i ----\n", client->delta_sequence & UPDATE_MASK
|
||||
// , client->netchan.outgoing_sequence & UPDATE_MASK);
|
||||
while (newindex < to->num_entities || oldindex < oldmax) {
|
||||
newnum =
|
||||
|
@ -346,7 +346,7 @@ SV_EmitPacketEntities (client_t *client, packet_entities_t *to, sizebuf_t *msg)
|
|||
oldnum = oldindex >= oldmax ? 9999 : from->entities[oldindex].number;
|
||||
|
||||
if (newnum == oldnum) { // delta update from old position
|
||||
//Con_Printf ("delta %i\n", newnum);
|
||||
//SV_Printf ("delta %i\n", newnum);
|
||||
SV_WriteDelta (&from->entities[oldindex], &to->entities[newindex],
|
||||
msg, false, client->stdver);
|
||||
oldindex++;
|
||||
|
@ -357,7 +357,7 @@ SV_EmitPacketEntities (client_t *client, packet_entities_t *to, sizebuf_t *msg)
|
|||
if (newnum < oldnum) { // this is a new entity, send it from
|
||||
// the baseline
|
||||
ent = EDICT_NUM (&sv_pr_state, newnum);
|
||||
//Con_Printf ("baseline %i\n", newnum);
|
||||
//SV_Printf ("baseline %i\n", newnum);
|
||||
SV_WriteDelta (ent->data, &to->entities[newindex], msg, true,
|
||||
client->stdver);
|
||||
newindex++;
|
||||
|
@ -366,7 +366,7 @@ SV_EmitPacketEntities (client_t *client, packet_entities_t *to, sizebuf_t *msg)
|
|||
|
||||
if (newnum > oldnum) { // the old entity isn't present in
|
||||
// the new message
|
||||
//Con_Printf ("remove %i\n", oldnum);
|
||||
//SV_Printf ("remove %i\n", oldnum);
|
||||
MSG_WriteShort (msg, oldnum | U_REMOVE);
|
||||
oldindex++;
|
||||
continue;
|
||||
|
|
|
@ -210,7 +210,7 @@ SV_CalcPHS (void)
|
|||
byte *scan;
|
||||
int count, vcount;
|
||||
|
||||
Con_Printf ("Building PHS...\n");
|
||||
SV_Printf ("Building PHS...\n");
|
||||
|
||||
num = sv.worldmodel->numleafs;
|
||||
rowwords = (num + 31) >> 5;
|
||||
|
@ -263,7 +263,7 @@ SV_CalcPHS (void)
|
|||
count++;
|
||||
}
|
||||
|
||||
Con_Printf ("Average leafs visible / hearable / total: %i / %i / %i\n",
|
||||
SV_Printf ("Average leafs visible / hearable / total: %i / %i / %i\n",
|
||||
vcount / num, count / num, num);
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ SV_CheckModel (char *mdl)
|
|||
if (buf) {
|
||||
crc = CRC_Block (buf, com_filesize);
|
||||
} else {
|
||||
Con_Printf ("WARNING: cannot generate checksum for %s\n", mdl);
|
||||
SV_Printf ("WARNING: cannot generate checksum for %s\n", mdl);
|
||||
}
|
||||
|
||||
return crc;
|
||||
|
|
|
@ -210,7 +210,7 @@ SV_Error (char *error, ...)
|
|||
vsnprintf (string, sizeof (string), error, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
Con_Printf ("SV_Error: %s\n", string);
|
||||
SV_Printf ("SV_Error: %s\n", string);
|
||||
|
||||
SV_FinalMessage (va ("server crashed: %s\n", string));
|
||||
|
||||
|
@ -272,9 +272,9 @@ SV_DropClient (client_t *drop)
|
|||
}
|
||||
}
|
||||
if (drop->spectator)
|
||||
Con_Printf ("Spectator %s removed\n", drop->name);
|
||||
SV_Printf ("Spectator %s removed\n", drop->name);
|
||||
else
|
||||
Con_Printf ("Client %s removed\n", drop->name);
|
||||
SV_Printf ("Client %s removed\n", drop->name);
|
||||
|
||||
if (drop->download) {
|
||||
Qclose (drop->download);
|
||||
|
@ -340,7 +340,7 @@ SV_FullClientUpdate (client_t *client, sizebuf_t *buf)
|
|||
|
||||
i = client - svs.clients;
|
||||
|
||||
// Con_Printf("SV_FullClientUpdate: Updated frags for client %d\n", i);
|
||||
// SV_Printf("SV_FullClientUpdate: Updated frags for client %d\n", i);
|
||||
|
||||
MSG_WriteByte (buf, svc_updatefrags);
|
||||
MSG_WriteByte (buf, i);
|
||||
|
@ -438,7 +438,7 @@ CheckForFlood (flood_enum_t cmdtype)
|
|||
floodstatus[cmdtype][i].floodcount += 1;
|
||||
if (floodstatus[cmdtype][i].floodcount > netdosvalues[cmdtype]) {
|
||||
if ((lastmessagetime + 5) < currenttime)
|
||||
Con_Printf ("Blocking type %d flood from (or to) %s\n",
|
||||
SV_Printf ("Blocking type %d flood from (or to) %s\n",
|
||||
cmdtype, NET_AdrToString (net_from));
|
||||
floodstatus[cmdtype][i].floodcount = 0;
|
||||
floodstatus[cmdtype][i].issued = currenttime;
|
||||
|
@ -487,7 +487,7 @@ SVC_Status (void)
|
|||
con_printf_no_log = 1;
|
||||
Cmd_TokenizeString ("status");
|
||||
SV_BeginRedirect (RD_PACKET);
|
||||
Con_Printf ("%s\n", svs.info);
|
||||
SV_Printf ("%s\n", svs.info);
|
||||
for (i = 0; i < MAX_CLIENTS; i++) {
|
||||
cl = &svs.clients[i];
|
||||
if ((cl->state == cs_connected || cl->state == cs_spawned)
|
||||
|
@ -497,7 +497,7 @@ SVC_Status (void)
|
|||
top = (top < 0) ? 0 : ((top > 13) ? 13 : top);
|
||||
bottom = (bottom < 0) ? 0 : ((bottom > 13) ? 13 : bottom);
|
||||
ping = SV_CalcPing (cl);
|
||||
Con_Printf ("%i %i %i %i \"%s\" \"%s\" %i %i\n", cl->userid,
|
||||
SV_Printf ("%i %i %i %i \"%s\" \"%s\" %i %i\n", cl->userid,
|
||||
cl->old_frags,
|
||||
(int) (realtime - cl->connection_started) / 60, ping,
|
||||
cl->name, Info_ValueForKey (cl->userinfo, "skin"), top,
|
||||
|
@ -529,7 +529,7 @@ SV_CheckLog (void)
|
|||
svs.logsequence++;
|
||||
sz = &svs.log[svs.logsequence & 1];
|
||||
sz->cursize = 0;
|
||||
Con_Printf ("beginning fraglog sequence %i\n", svs.logsequence);
|
||||
SV_Printf ("beginning fraglog sequence %i\n", svs.logsequence);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ SVC_DirectConnect (void)
|
|||
if (version != PROTOCOL_VERSION) {
|
||||
Netchan_OutOfBandPrint (net_from, "%c\nServer is version %s.\n",
|
||||
A2C_PRINT, QW_VERSION);
|
||||
Con_Printf ("* rejected connect from version %i\n", version);
|
||||
SV_Printf ("* rejected connect from version %i\n", version);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -710,7 +710,7 @@ SVC_DirectConnect (void)
|
|||
s = Info_ValueForKey (userinfo, "*qf_version");
|
||||
if ((!s[0]) || sv_minqfversion->string[0]) { // kick old clients?
|
||||
if (ver_compare (s, sv_minqfversion->string) < 0) {
|
||||
Con_Printf ("%s: Version %s is less than minimum version %s.\n",
|
||||
SV_Printf ("%s: Version %s is less than minimum version %s.\n",
|
||||
NET_AdrToString (net_from), s, sv_minqfversion->string);
|
||||
|
||||
Netchan_OutOfBandPrint (net_from,
|
||||
|
@ -725,7 +725,7 @@ SVC_DirectConnect (void)
|
|||
if (spectator_password->string[0] &&
|
||||
!strcaseequal (spectator_password->string, "none") &&
|
||||
!strequal (spectator_password->string, s)) { // failed
|
||||
Con_Printf ("%s: spectator password failed\n",
|
||||
SV_Printf ("%s: spectator password failed\n",
|
||||
NET_AdrToString (net_from));
|
||||
Netchan_OutOfBandPrint (net_from,
|
||||
"%c\nrequires a spectator password\n\n",
|
||||
|
@ -740,7 +740,7 @@ SVC_DirectConnect (void)
|
|||
if (password->string[0]
|
||||
&& !strcaseequal (password->string, "none")
|
||||
&& !strequal (password->string, s)) {
|
||||
Con_Printf ("%s:password failed\n", NET_AdrToString (net_from));
|
||||
SV_Printf ("%s:password failed\n", NET_AdrToString (net_from));
|
||||
Netchan_OutOfBandPrint (net_from,
|
||||
"%c\nserver requires a password\n\n",
|
||||
A2C_PRINT);
|
||||
|
@ -778,12 +778,12 @@ SVC_DirectConnect (void)
|
|||
&& (cl->netchan.qport == qport
|
||||
|| adr.port == cl->netchan.remote_address.port)) {
|
||||
if (cl->state == cs_connected) {
|
||||
Con_Printf ("%s:dup connect\n", NET_AdrToString (adr));
|
||||
SV_Printf ("%s:dup connect\n", NET_AdrToString (adr));
|
||||
userid--;
|
||||
return;
|
||||
}
|
||||
|
||||
Con_Printf ("%s:reconnect\n", NET_AdrToString (adr));
|
||||
SV_Printf ("%s:reconnect\n", NET_AdrToString (adr));
|
||||
SV_DropClient (cl);
|
||||
break;
|
||||
}
|
||||
|
@ -810,7 +810,7 @@ SVC_DirectConnect (void)
|
|||
Cvar_SetValue (maxspectators, MAX_CLIENTS - maxclients->int_val);
|
||||
if ((spectator && spectators >= maxspectators->int_val)
|
||||
|| (!spectator && clients >= maxclients->int_val)) {
|
||||
Con_Printf ("%s:full connect\n", NET_AdrToString (adr));
|
||||
SV_Printf ("%s:full connect\n", NET_AdrToString (adr));
|
||||
Netchan_OutOfBandPrint (adr, "%c\nserver is full\n\n", A2C_PRINT);
|
||||
return;
|
||||
}
|
||||
|
@ -823,7 +823,7 @@ SVC_DirectConnect (void)
|
|||
}
|
||||
}
|
||||
if (!newcl) {
|
||||
Con_Printf ("WARNING: miscounted available clients\n");
|
||||
SV_Printf ("WARNING: miscounted available clients\n");
|
||||
return;
|
||||
}
|
||||
// build a new connection
|
||||
|
@ -865,7 +865,7 @@ SVC_DirectConnect (void)
|
|||
newcl->spawn_parms[i] = sv_globals.parms[i];
|
||||
|
||||
if (newcl->spectator)
|
||||
Con_Printf ("Spectator %s connected\n", newcl->name);
|
||||
SV_Printf ("Spectator %s connected\n", newcl->name);
|
||||
else
|
||||
Con_DPrintf ("Client %s connected\n", newcl->name);
|
||||
newcl->sendinfo = true;
|
||||
|
@ -949,9 +949,9 @@ SVC_RemoteCommand (void)
|
|||
SV_BroadcastPrintf (PRINT_HIGH, "Admin %s issued %s command:\n",
|
||||
name, Cmd_Argv(2));
|
||||
} else if (admin_cmd) {
|
||||
Con_Printf ("Admin %s issued %s command:\n", name, Cmd_Argv(2));
|
||||
SV_Printf ("Admin %s issued %s command:\n", name, Cmd_Argv(2));
|
||||
} else {
|
||||
Con_Printf("User %s %s rcon command:\n", name,
|
||||
SV_Printf("User %s %s rcon command:\n", name,
|
||||
do_cmd? "issued":"attempted");
|
||||
}
|
||||
}
|
||||
|
@ -965,7 +965,7 @@ SVC_RemoteCommand (void)
|
|||
len += strlen (Cmd_Argv (i)) + 1; // +1 for " "
|
||||
}
|
||||
|
||||
Con_Printf ("Rcon from %s:\n\trcon (hidden) %s\n",
|
||||
SV_Printf ("Rcon from %s:\n\trcon (hidden) %s\n",
|
||||
NET_AdrToString (net_from), remaining);
|
||||
|
||||
SV_BeginRedirect (RD_PACKET);
|
||||
|
@ -974,14 +974,14 @@ SVC_RemoteCommand (void)
|
|||
Cmd_ExecuteString (remaining, src_command);
|
||||
rcon_from_user = false;
|
||||
} else {
|
||||
Con_Printf ("Bad rcon from %s:\n%s\n", NET_AdrToString (net_from),
|
||||
SV_Printf ("Bad rcon from %s:\n%s\n", NET_AdrToString (net_from),
|
||||
net_message->message->data + 4);
|
||||
|
||||
SV_BeginRedirect (RD_PACKET);
|
||||
if (admin_cmd) {
|
||||
Con_Printf("Command not valid with admin password.\n");
|
||||
SV_Printf("Command not valid with admin password.\n");
|
||||
} else {
|
||||
Con_Printf ("Bad rcon_password.\n");
|
||||
SV_Printf ("Bad rcon_password.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1018,7 +1018,7 @@ SV_ConnectionlessPacket (void)
|
|||
return;
|
||||
}
|
||||
if (c[0] == A2A_ACK && (c[1] == 0 || c[1] == '\n')) {
|
||||
Con_Printf ("A2A_ACK from %s\n", NET_AdrToString (net_from));
|
||||
SV_Printf ("A2A_ACK from %s\n", NET_AdrToString (net_from));
|
||||
return;
|
||||
} else if (!strcmp (c, "status")) {
|
||||
SVC_Status ();
|
||||
|
@ -1035,7 +1035,7 @@ SV_ConnectionlessPacket (void)
|
|||
} else if (!strcmp (c, "rcon"))
|
||||
SVC_RemoteCommand ();
|
||||
else
|
||||
Con_Printf ("bad connectionless packet from %s:\n%s\n",
|
||||
SV_Printf ("bad connectionless packet from %s:\n%s\n",
|
||||
NET_AdrToString (net_from), s);
|
||||
}
|
||||
|
||||
|
@ -1104,7 +1104,7 @@ StringToFilter (char *s, ipfilter_t * f)
|
|||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (*s < '0' || *s > '9') {
|
||||
Con_Printf ("Bad filter address: %s\n", s);
|
||||
SV_Printf ("Bad filter address: %s\n", s);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1141,7 +1141,7 @@ SV_AddIP_f (void)
|
|||
break; // free spot
|
||||
if (i == numipfilters) {
|
||||
if (numipfilters == MAX_IPFILTERS) {
|
||||
Con_Printf ("IP filter list is full\n");
|
||||
SV_Printf ("IP filter list is full\n");
|
||||
return;
|
||||
}
|
||||
numipfilters++;
|
||||
|
@ -1167,10 +1167,10 @@ SV_RemoveIP_f (void)
|
|||
for (j = i + 1; j < numipfilters; j++)
|
||||
ipfilters[j - 1] = ipfilters[j];
|
||||
numipfilters--;
|
||||
Con_Printf ("Removed.\n");
|
||||
SV_Printf ("Removed.\n");
|
||||
return;
|
||||
}
|
||||
Con_Printf ("Didn't find %s.\n", Cmd_Argv (1));
|
||||
SV_Printf ("Didn't find %s.\n", Cmd_Argv (1));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1182,10 +1182,10 @@ SV_ListIP_f (void)
|
|||
int i;
|
||||
byte b[4];
|
||||
|
||||
Con_Printf ("Filter list:\n");
|
||||
SV_Printf ("Filter list:\n");
|
||||
for (i = 0; i < numipfilters; i++) {
|
||||
*(unsigned int *) b = ipfilters[i].compare;
|
||||
Con_Printf ("%3i.%3i.%3i.%3i\n", b[0], b[1], b[2], b[3]);
|
||||
SV_Printf ("%3i.%3i.%3i.%3i\n", b[0], b[1], b[2], b[3]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1202,11 +1202,11 @@ SV_WriteIP_f (void)
|
|||
|
||||
snprintf (name, sizeof (name), "%s/listip.cfg", com_gamedir);
|
||||
|
||||
Con_Printf ("Writing %s.\n", name);
|
||||
SV_Printf ("Writing %s.\n", name);
|
||||
|
||||
f = Qopen (name, "wb");
|
||||
if (!f) {
|
||||
Con_Printf ("Couldn't open %s\n", name);
|
||||
SV_Printf ("Couldn't open %s\n", name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1228,17 +1228,17 @@ SV_netDoSexpire_f (void)
|
|||
int i;
|
||||
|
||||
if (Cmd_Argc () == 1) {
|
||||
Con_Printf ("Current DoS prot. expire settings: ");
|
||||
SV_Printf ("Current DoS prot. expire settings: ");
|
||||
for (i = 0; i < DOSFLOODCMDS; i++)
|
||||
Con_Printf ("%f ", netdosexpire[i]);
|
||||
Con_Printf ("\n");
|
||||
SV_Printf ("%f ", netdosexpire[i]);
|
||||
SV_Printf ("\n");
|
||||
if (!sv_netdosprotect->int_val)
|
||||
Con_Printf ("(disabled)\n");
|
||||
SV_Printf ("(disabled)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_Argc () != DOSFLOODCMDS + 1) {
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("Usage: netdosexpire <ping> <log> <connect> <status> <rcon> <ban>\n");
|
||||
return;
|
||||
}
|
||||
|
@ -1261,17 +1261,17 @@ SV_netDoSvalues_f (void)
|
|||
int i;
|
||||
|
||||
if (Cmd_Argc () == 1) {
|
||||
Con_Printf ("Current DoS prot. value settings: ");
|
||||
SV_Printf ("Current DoS prot. value settings: ");
|
||||
for (i = 0; i < DOSFLOODCMDS; i++)
|
||||
Con_Printf ("%f ", netdosvalues[i]);
|
||||
Con_Printf ("\n");
|
||||
SV_Printf ("%f ", netdosvalues[i]);
|
||||
SV_Printf ("\n");
|
||||
if (!sv_netdosprotect->int_val)
|
||||
Con_Printf ("(disabled)\n");
|
||||
SV_Printf ("(disabled)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_Argc () != DOSFLOODCMDS + 1) {
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
("Usage: netdosvalues <ping> <log> <connect> <status> <rcon> <ban>\n");
|
||||
return;
|
||||
}
|
||||
|
@ -1347,7 +1347,7 @@ SV_ReadPackets (void)
|
|||
}
|
||||
|
||||
if (net_message->message->cursize < 11) {
|
||||
Con_Printf ("%s: Runt packet\n", NET_AdrToString (net_from));
|
||||
SV_Printf ("%s: Runt packet\n", NET_AdrToString (net_from));
|
||||
continue;
|
||||
}
|
||||
// read the qport out of the message so we can fix up
|
||||
|
@ -1385,7 +1385,7 @@ SV_ReadPackets (void)
|
|||
continue;
|
||||
|
||||
// packet is not from a known client
|
||||
// Con_Printf ("%s:sequenced packet without connection\n"
|
||||
// SV_Printf ("%s:sequenced packet without connection\n"
|
||||
// ,NET_AdrToString(net_from));
|
||||
}
|
||||
}
|
||||
|
@ -1465,7 +1465,7 @@ SV_CheckVars (void)
|
|||
if (spw && spw[0] && strcmp (spw, "none"))
|
||||
v |= 2;
|
||||
|
||||
Con_Printf ("Updated needpass.\n");
|
||||
SV_Printf ("Updated needpass.\n");
|
||||
if (!v)
|
||||
Info_SetValueForKey (svs.info, "needpass", "", MAX_SERVERINFO_STRING);
|
||||
else
|
||||
|
@ -1785,7 +1785,7 @@ Master_Heartbeat (void)
|
|||
// send to group master
|
||||
for (i = 0; i < MAX_MASTERS; i++)
|
||||
if (master_adr[i].port) {
|
||||
Con_Printf ("Sending heartbeat to %s\n",
|
||||
SV_Printf ("Sending heartbeat to %s\n",
|
||||
NET_AdrToString (master_adr[i]));
|
||||
NET_SendPacket (strlen (string), string, master_adr[i]);
|
||||
}
|
||||
|
@ -1807,7 +1807,7 @@ Master_Shutdown (void)
|
|||
// send to group master
|
||||
for (i = 0; i < MAX_MASTERS; i++)
|
||||
if (master_adr[i].port) {
|
||||
Con_Printf ("Sending heartbeat to %s\n",
|
||||
SV_Printf ("Sending heartbeat to %s\n",
|
||||
NET_AdrToString (master_adr[i]));
|
||||
NET_SendPacket (strlen (string), string, master_adr[i]);
|
||||
}
|
||||
|
@ -1894,7 +1894,7 @@ SV_ExtractFromUserinfo (client_t *cl)
|
|||
"%c\nPlease choose a different name.\n", A2C_PRINT);
|
||||
SV_ClientPrintf (cl, PRINT_HIGH,
|
||||
"Please choose a different name.\n");
|
||||
Con_Printf("Client %d kicked for invalid name\n", cl->userid);
|
||||
SV_Printf("Client %d kicked for invalid name\n", cl->userid);
|
||||
SV_DropClient (cl);
|
||||
return;
|
||||
}
|
||||
|
@ -1963,7 +1963,7 @@ SV_InitNet (void)
|
|||
p = COM_CheckParm ("-port");
|
||||
if (p && p < com_argc) {
|
||||
port = atoi (com_argv[p + 1]);
|
||||
Con_Printf ("Port: %i\n", port);
|
||||
SV_Printf ("Port: %i\n", port);
|
||||
}
|
||||
NET_Init (port);
|
||||
|
||||
|
@ -2068,13 +2068,15 @@ SV_Init (void)
|
|||
|
||||
host_initialized = true;
|
||||
|
||||
// Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
|
||||
Con_Printf ("%4.1f megabyte heap\n", host_parms.memsize / (1024 * 1024.0));
|
||||
// SV_Printf ("Exe: "__TIME__" "__DATE__"\n");
|
||||
SV_Printf ("%4.1f megabyte heap\n", host_parms.memsize / (1024 * 1024.0));
|
||||
|
||||
Con_Printf ("\n%s server, Version %s (build %04d)\n\n", PROGRAM, VERSION,
|
||||
SV_Printf ("\n");
|
||||
SV_Printf ("%s server, Version %s (build %04d)\n", PROGRAM, VERSION,
|
||||
build_number ());
|
||||
SV_Printf ("\n");
|
||||
|
||||
Con_Printf ("<==> %s initialized <==>\n", PROGRAM);
|
||||
SV_Printf ("<==> %s initialized <==>\n", PROGRAM);
|
||||
|
||||
// process command line arguments
|
||||
Cmd_Exec_File (fs_usercfg->string);
|
||||
|
|
|
@ -192,7 +192,7 @@ SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
|||
if (relink)
|
||||
SV_LinkEdict (ent, true);
|
||||
SVFIELD (ent, flags, float) = (int) SVFIELD (ent, flags, float) & ~FL_ONGROUND;
|
||||
// Con_Printf ("fall down\n");
|
||||
// SV_Printf ("fall down\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
|||
}
|
||||
|
||||
if ((int) SVFIELD (ent, flags, float) & FL_PARTIALGROUND) {
|
||||
// Con_Printf ("back on ground\n");
|
||||
// SV_Printf ("back on ground\n");
|
||||
SVFIELD (ent, flags, float) = (int) SVFIELD (ent, flags, float) & ~FL_PARTIALGROUND;
|
||||
}
|
||||
SVFIELD (ent, groundentity, entity) = EDICT_TO_PROG (&sv_pr_state, trace.ent);
|
||||
|
@ -270,7 +270,7 @@ SV_StepDirection (edict_t *ent, float yaw, float dist)
|
|||
void
|
||||
SV_FixCheckBottom (edict_t *ent)
|
||||
{
|
||||
// Con_Printf ("SV_FixCheckBottom\n");
|
||||
// SV_Printf ("SV_FixCheckBottom\n");
|
||||
|
||||
SVFIELD (ent, flags, float) = (int) SVFIELD (ent, flags, float) | FL_PARTIALGROUND;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ ClientReliableCheckBlock (client_t *cl, int maxsize)
|
|||
|
||||
if (cl->backbuf.cursize > cl->backbuf.maxsize - maxsize - 1) {
|
||||
if (cl->num_backbuf == MAX_BACK_BUFFERS) {
|
||||
Con_Printf ("WARNING: MAX_BACK_BUFFERS for %s\n", cl->name);
|
||||
SV_Printf ("WARNING: MAX_BACK_BUFFERS for %s\n", cl->name);
|
||||
cl->backbuf.cursize = 0; // don't overflow without
|
||||
// allowoverflow set
|
||||
cl->netchan.message.overflowed = true; // this will drop the
|
||||
|
@ -89,7 +89,7 @@ ClientReliable_FinishWrite (client_t *cl)
|
|||
cl->backbuf_size[cl->num_backbuf - 1] = cl->backbuf.cursize;
|
||||
|
||||
if (cl->backbuf.overflowed) {
|
||||
Con_Printf ("WARNING: backbuf [%d] reliable overflow for %s\n",
|
||||
SV_Printf ("WARNING: backbuf [%d] reliable overflow for %s\n",
|
||||
cl->num_backbuf, cl->name);
|
||||
cl->netchan.message.overflowed = true; // this will drop the
|
||||
// client
|
||||
|
|
|
@ -92,7 +92,7 @@ SV_CheckAllEnts (void)
|
|||
|| SVFIELD (check, movetype, float) == MOVETYPE_NOCLIP) continue;
|
||||
|
||||
if (SV_TestEntityPosition (check))
|
||||
Con_Printf ("entity in invalid position\n");
|
||||
SV_Printf ("entity in invalid position\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,12 +110,12 @@ SV_CheckVelocity (edict_t *ent)
|
|||
//
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (IS_NAN (SVFIELD (ent, velocity, vector)[i])) {
|
||||
Con_Printf ("Got a NaN velocity on %s\n",
|
||||
SV_Printf ("Got a NaN velocity on %s\n",
|
||||
PR_GetString (&sv_pr_state, SVFIELD (ent, classname, string)));
|
||||
SVFIELD (ent, velocity, vector)[i] = 0;
|
||||
}
|
||||
if (IS_NAN (SVFIELD (ent, origin, vector)[i])) {
|
||||
Con_Printf ("Got a NaN origin on %s\n",
|
||||
SV_Printf ("Got a NaN origin on %s\n",
|
||||
PR_GetString (&sv_pr_state, SVFIELD (ent, classname, string)));
|
||||
SVFIELD (ent, origin, vector)[i] = 0;
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ SV_FlyMove (edict_t *ent, float time, trace_t *steptrace)
|
|||
VectorCopy (new_velocity, SVFIELD (ent, velocity, vector));
|
||||
} else { // go along the crease
|
||||
if (numplanes != 2) {
|
||||
// Con_Printf ("clip velocity, numplanes == %i\n",numplanes);
|
||||
// SV_Printf ("clip velocity, numplanes == %i\n",numplanes);
|
||||
VectorCopy (vec3_origin, SVFIELD (ent, velocity, vector));
|
||||
return 7;
|
||||
}
|
||||
|
@ -592,7 +592,7 @@ SV_Physics_Pusher (edict_t *ent)
|
|||
|
||||
l = Length (move);
|
||||
if (l > 1.0 / 64) {
|
||||
// Con_Printf ("**** snap: %f\n", Length (l));
|
||||
// SV_Printf ("**** snap: %f\n", Length (l));
|
||||
VectorCopy (oldorg, SVFIELD (ent, origin, vector));
|
||||
SV_Push (ent, move);
|
||||
}
|
||||
|
@ -815,7 +815,7 @@ SV_PPushMove (edict_t *pusher, float movetime) // player push
|
|||
|
||||
// Stage 2: Is it a player we can push?
|
||||
if (SVFIELD (check, movetype, float) == MOVETYPE_WALK) {
|
||||
Con_Printf ("Pusher encountered a player\n"); // Yes!@#!@
|
||||
SV_Printf ("Pusher encountered a player\n"); // Yes!@#!@
|
||||
SVFIELD (pusher, solid, float) = SOLID_NOT;
|
||||
SV_PushEntity (check, move);
|
||||
SVFIELD (pusher, solid, float) = oldsolid;
|
||||
|
|
|
@ -82,7 +82,7 @@ PF_error (progs_t *pr)
|
|||
edict_t *ed;
|
||||
|
||||
s = PF_VarString (pr, 0);
|
||||
Con_Printf ("======SERVER ERROR in %s:\n%s\n",
|
||||
SV_Printf ("======SERVER ERROR in %s:\n%s\n",
|
||||
PR_GetString (pr, pr->pr_xfunction->s_name), s);
|
||||
ed = PROG_TO_EDICT (pr, *sv_globals.self);
|
||||
ED_Print (pr, ed);
|
||||
|
@ -105,7 +105,7 @@ PF_objerror (progs_t *pr)
|
|||
edict_t *ed;
|
||||
|
||||
s = PF_VarString (pr, 0);
|
||||
Con_Printf ("======OBJECT ERROR in %s:\n%s\n",
|
||||
SV_Printf ("======OBJECT ERROR in %s:\n%s\n",
|
||||
PR_GetString (pr, pr->pr_xfunction->s_name), s);
|
||||
ed = PROG_TO_EDICT (pr, *sv_globals.self);
|
||||
ED_Print (pr, ed);
|
||||
|
@ -251,7 +251,7 @@ PF_sprint (progs_t *pr)
|
|||
s = PF_VarString (pr, 2);
|
||||
|
||||
if (entnum < 1 || entnum > MAX_CLIENTS) {
|
||||
Con_Printf ("tried to sprint to a non-client\n");
|
||||
SV_Printf ("tried to sprint to a non-client\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ PF_centerprint (progs_t *pr)
|
|||
s = PF_VarString (pr, 1);
|
||||
|
||||
if (entnum < 1 || entnum > MAX_CLIENTS) {
|
||||
Con_Printf ("tried to sprint to a non-client\n");
|
||||
SV_Printf ("tried to sprint to a non-client\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -440,7 +440,7 @@ PF_ambientsound (progs_t *pr)
|
|||
break;
|
||||
|
||||
if (!*check) {
|
||||
Con_Printf ("no precache: %s\n", samp);
|
||||
SV_Printf ("no precache: %s\n", samp);
|
||||
return;
|
||||
}
|
||||
// add an svc_spawnambient command to the level signon packet
|
||||
|
@ -494,7 +494,7 @@ PF_sound (progs_t *pr)
|
|||
void
|
||||
PF_break (progs_t *pr)
|
||||
{
|
||||
Con_Printf ("break statement\n");
|
||||
SV_Printf ("break statement\n");
|
||||
*(int *) -4 = 0; // dump to debugger
|
||||
// PR_RunError (pr, "break statement");
|
||||
}
|
||||
|
@ -752,7 +752,7 @@ PF_cvar_set (progs_t *pr)
|
|||
var = Cvar_FindAlias (var_name);
|
||||
if (!var) {
|
||||
// FIXME: make Con_DPrint?
|
||||
Con_Printf ("PF_cvar_set: variable %s not found\n", var_name);
|
||||
SV_Printf ("PF_cvar_set: variable %s not found\n", var_name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -807,7 +807,7 @@ PF_findradius (progs_t *pr)
|
|||
void
|
||||
PF_dprint (progs_t *pr)
|
||||
{
|
||||
Con_Printf ("%s", PF_VarString (pr, 0));
|
||||
SV_Printf ("%s", PF_VarString (pr, 0));
|
||||
}
|
||||
|
||||
char pr_string_temp[128];
|
||||
|
@ -1472,7 +1472,7 @@ PF_makestatic (progs_t *pr)
|
|||
MSG_WriteByte (&sv.signon, svc_spawnstatic);
|
||||
|
||||
model = PR_GetString (pr, SVFIELD (ent, model, string));
|
||||
//Con_Printf ("Model: %d %s\n", SVFIELD (ent, model, string), model);
|
||||
//SV_Printf ("Model: %d %s\n", SVFIELD (ent, model, string), model);
|
||||
MSG_WriteByte (&sv.signon, SV_ModelIndex (model));
|
||||
|
||||
MSG_WriteByte (&sv.signon, SVFIELD (ent, frame, float));
|
||||
|
|
|
@ -87,7 +87,7 @@ ED_PrintEdict_f (void)
|
|||
int i;
|
||||
|
||||
i = atoi (Cmd_Argv (1));
|
||||
Con_Printf ("\n EDICT %i:\n", i);
|
||||
SV_Printf ("\n EDICT %i:\n", i);
|
||||
ED_PrintNum (&sv_pr_state, i);
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#define CHAN_BODY 4
|
||||
|
||||
/*
|
||||
Con_Printf redirection
|
||||
SV_Printf redirection
|
||||
*/
|
||||
|
||||
char outputbuf[8000];
|
||||
|
@ -98,7 +98,7 @@ SV_FlushRedirect (void)
|
|||
/*
|
||||
SV_BeginRedirect
|
||||
|
||||
Send Con_Printf data to the remote client
|
||||
Send SV_Printf data to the remote client
|
||||
instead of the console
|
||||
*/
|
||||
void
|
||||
|
@ -117,14 +117,14 @@ SV_EndRedirect (void)
|
|||
|
||||
|
||||
/*
|
||||
Con_Printf
|
||||
SV_Printf
|
||||
|
||||
Handles cursor positioning, line wrapping, etc
|
||||
*/
|
||||
#define MAXPRINTMSG 4096
|
||||
|
||||
void
|
||||
Con_Printf (char *fmt, ...)
|
||||
SV_Printf (char *fmt, ...)
|
||||
{
|
||||
static int pending = 0; // partial line being printed
|
||||
va_list argptr;
|
||||
|
@ -166,33 +166,12 @@ Con_Printf (char *fmt, ...)
|
|||
pending = 0;
|
||||
}
|
||||
|
||||
Con_Print (msg2); // also echo to debugging console
|
||||
Con_Printf ("%s", msg2); // also echo to debugging console
|
||||
if (sv_logfile)
|
||||
Qprintf (sv_logfile, "%s", msg2);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Con_DPrintf
|
||||
|
||||
A Con_Printf that only shows up if the "developer" cvar is set
|
||||
*/
|
||||
void
|
||||
Con_DPrintf (char *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char msg[MAXPRINTMSG];
|
||||
|
||||
if (!developer->int_val)
|
||||
return;
|
||||
|
||||
va_start (argptr, fmt);
|
||||
vsnprintf (msg, sizeof (msg), fmt, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
Con_Printf ("%s", msg);
|
||||
}
|
||||
|
||||
/*
|
||||
EVENT MESSAGES
|
||||
*/
|
||||
|
@ -244,7 +223,7 @@ SV_BroadcastPrintf (int level, char *fmt, ...)
|
|||
vsnprintf (string, sizeof (string), fmt, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
Con_Printf ("%s", string); // print to the console
|
||||
SV_Printf ("%s", string); // print to the console
|
||||
|
||||
for (i = 0, cl = svs.clients; i < MAX_CLIENTS; i++, cl++) {
|
||||
if (level < cl->messagelevel)
|
||||
|
@ -348,7 +327,7 @@ SV_Multicast (vec3_t origin, int to)
|
|||
// -1 is because pvs rows are 1 based, not 0 based like leafs
|
||||
leafnum = leaf - sv.worldmodel->leafs - 1;
|
||||
if (!(mask[leafnum >> 3] & (1 << (leafnum & 7)))) {
|
||||
// Con_Printf ("supressed multicast\n");
|
||||
// SV_Printf ("supressed multicast\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -407,7 +386,7 @@ SV_StartSound (edict_t *entity, int channel, char *sample, int volume,
|
|||
break;
|
||||
|
||||
if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) {
|
||||
Con_Printf ("SV_StartSound: %s not precacheed\n", sample);
|
||||
SV_Printf ("SV_StartSound: %s not precacheed\n", sample);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -617,7 +596,7 @@ SV_SendClientDatagram (client_t *client)
|
|||
// copy the accumulated multicast datagram
|
||||
// for this client out to the message
|
||||
if (client->datagram.overflowed)
|
||||
Con_Printf ("WARNING: datagram overflowed for %s\n", client->name);
|
||||
SV_Printf ("WARNING: datagram overflowed for %s\n", client->name);
|
||||
else
|
||||
SZ_Write (&msg, client->datagram.data, client->datagram.cursize);
|
||||
SZ_Clear (&client->datagram);
|
||||
|
@ -627,7 +606,7 @@ SV_SendClientDatagram (client_t *client)
|
|||
SV_UpdateClientStats (client);
|
||||
|
||||
if (msg.overflowed) {
|
||||
Con_Printf ("WARNING: msg overflowed for %s\n", client->name);
|
||||
SV_Printf ("WARNING: msg overflowed for %s\n", client->name);
|
||||
SZ_Clear (&msg);
|
||||
}
|
||||
// send the datagram
|
||||
|
@ -773,7 +752,7 @@ SV_SendClientMessages (void)
|
|||
SZ_Clear (&c->netchan.message);
|
||||
SZ_Clear (&c->datagram);
|
||||
SV_BroadcastPrintf (PRINT_HIGH, "%s overflowed\n", c->name);
|
||||
Con_Printf ("WARNING: reliable overflow for %s\n", c->name);
|
||||
SV_Printf ("WARNING: reliable overflow for %s\n", c->name);
|
||||
SV_DropClient (c);
|
||||
c->send_message = true;
|
||||
c->netchan.cleartime = 0; // don't choke this message
|
||||
|
|
|
@ -202,9 +202,9 @@ main (int argc, char **argv)
|
|||
Cvar_Set (sys_sleep, "0");
|
||||
} else {
|
||||
if (!SetPriorityClass (GetCurrentProcess (), HIGH_PRIORITY_CLASS))
|
||||
Con_Printf ("SetPriorityClass() failed\n");
|
||||
SV_Printf ("SetPriorityClass() failed\n");
|
||||
else
|
||||
Con_Printf ("Process priority class set to HIGH\n");
|
||||
SV_Printf ("Process priority class set to HIGH\n");
|
||||
}
|
||||
|
||||
// sys_sleep > 0 seems to cause packet loss on WinNT (why?)
|
||||
|
|
|
@ -115,7 +115,7 @@ SV_New_f (void)
|
|||
//NOTE: This doesn't go through ClientReliableWrite since it's before the user
|
||||
//spawns. These functions are written to not overflow
|
||||
if (host_client->num_backbuf) {
|
||||
Con_Printf ("WARNING %s: [SV_New] Back buffered (%d0, clearing",
|
||||
SV_Printf ("WARNING %s: [SV_New] Back buffered (%d0, clearing",
|
||||
host_client->name, host_client->netchan.message.cursize);
|
||||
host_client->num_backbuf = 0;
|
||||
SZ_Clear (&host_client->netchan.message);
|
||||
|
@ -167,26 +167,26 @@ SV_Soundlist_f (void)
|
|||
unsigned n;
|
||||
|
||||
if (host_client->state != cs_connected) {
|
||||
Con_Printf ("soundlist not valid -- already spawned\n");
|
||||
SV_Printf ("soundlist not valid -- already spawned\n");
|
||||
return;
|
||||
}
|
||||
// handle the case of a level changing while a client was connecting
|
||||
if (atoi (Cmd_Argv (1)) != svs.spawncount) {
|
||||
Con_Printf ("SV_Soundlist_f from different level\n");
|
||||
SV_Printf ("SV_Soundlist_f from different level\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
|
||||
n = atoi (Cmd_Argv (2));
|
||||
if (n >= MAX_SOUNDS) {
|
||||
Con_Printf ("SV_Soundlist_f: Invalid soundlist index\n");
|
||||
SV_Printf ("SV_Soundlist_f: Invalid soundlist index\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
//NOTE: This doesn't go through ClientReliableWrite since it's before the user
|
||||
//spawns. These functions are written to not overflow
|
||||
if (host_client->num_backbuf) {
|
||||
Con_Printf ("WARNING %s: [SV_Soundlist] Back buffered (%d0, clearing",
|
||||
SV_Printf ("WARNING %s: [SV_Soundlist] Back buffered (%d0, clearing",
|
||||
host_client->name, host_client->netchan.message.cursize);
|
||||
host_client->num_backbuf = 0;
|
||||
SZ_Clear (&host_client->netchan.message);
|
||||
|
@ -217,26 +217,26 @@ SV_Modellist_f (void)
|
|||
unsigned n;
|
||||
|
||||
if (host_client->state != cs_connected) {
|
||||
Con_Printf ("modellist not valid -- already spawned\n");
|
||||
SV_Printf ("modellist not valid -- already spawned\n");
|
||||
return;
|
||||
}
|
||||
// handle the case of a level changing while a client was connecting
|
||||
if (atoi (Cmd_Argv (1)) != svs.spawncount) {
|
||||
Con_Printf ("SV_Modellist_f from different level\n");
|
||||
SV_Printf ("SV_Modellist_f from different level\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
|
||||
n = atoi (Cmd_Argv (2));
|
||||
if (n >= MAX_MODELS) {
|
||||
Con_Printf ("SV_Modellist_f: Invalid modellist index\n");
|
||||
SV_Printf ("SV_Modellist_f: Invalid modellist index\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
//NOTE: This doesn't go through ClientReliableWrite since it's before the user
|
||||
//spawns. These functions are written to not overflow
|
||||
if (host_client->num_backbuf) {
|
||||
Con_Printf ("WARNING %s: [SV_Modellist] Back buffered (%d0, clearing",
|
||||
SV_Printf ("WARNING %s: [SV_Modellist] Back buffered (%d0, clearing",
|
||||
host_client->name, host_client->netchan.message.cursize);
|
||||
host_client->num_backbuf = 0;
|
||||
SZ_Clear (&host_client->netchan.message);
|
||||
|
@ -266,12 +266,12 @@ SV_PreSpawn_f (void)
|
|||
unsigned int check;
|
||||
|
||||
if (host_client->state != cs_connected) {
|
||||
Con_Printf ("prespawn not valid -- already spawned\n");
|
||||
SV_Printf ("prespawn not valid -- already spawned\n");
|
||||
return;
|
||||
}
|
||||
// handle the case of a level changing while a client was connecting
|
||||
if (atoi (Cmd_Argv (1)) != svs.spawncount) {
|
||||
Con_Printf ("SV_PreSpawn_f from different level\n");
|
||||
SV_Printf ("SV_PreSpawn_f from different level\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ SV_PreSpawn_f (void)
|
|||
// the user
|
||||
// spawns. These functions are written to not overflow
|
||||
if (host_client->num_backbuf) {
|
||||
Con_Printf ("WARNING %s: [SV_PreSpawn] Back buffered (%d0, clearing",
|
||||
SV_Printf ("WARNING %s: [SV_PreSpawn] Back buffered (%d0, clearing",
|
||||
host_client->name, host_client->netchan.message.cursize);
|
||||
host_client->num_backbuf = 0;
|
||||
SZ_Clear (&host_client->netchan.message);
|
||||
|
@ -336,12 +336,12 @@ SV_Spawn_f (void)
|
|||
int n;
|
||||
|
||||
if (host_client->state != cs_connected) {
|
||||
Con_Printf ("Spawn not valid -- already spawned\n");
|
||||
SV_Printf ("Spawn not valid -- already spawned\n");
|
||||
return;
|
||||
}
|
||||
// handle the case of a level changing while a client was connecting
|
||||
if (atoi (Cmd_Argv (1)) != svs.spawncount) {
|
||||
Con_Printf ("SV_Spawn_f from different level\n");
|
||||
SV_Printf ("SV_Spawn_f from different level\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ SV_Spawn_f (void)
|
|||
|
||||
// make sure n is valid
|
||||
if (n < 0 || n > MAX_CLIENTS) {
|
||||
Con_Printf ("SV_Spawn_f invalid client start\n");
|
||||
SV_Printf ("SV_Spawn_f invalid client start\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ SV_Begin_f (void)
|
|||
|
||||
// handle the case of a level changing while a client was connecting
|
||||
if (atoi (Cmd_Argv (1)) != svs.spawncount) {
|
||||
Con_Printf ("SV_Begin_f from different level\n");
|
||||
SV_Printf ("SV_Begin_f from different level\n");
|
||||
SV_New_f ();
|
||||
return;
|
||||
}
|
||||
|
@ -615,13 +615,13 @@ SV_NextUpload (void)
|
|||
if (!host_client->upload) {
|
||||
host_client->upload = Qopen (host_client->uploadfn, "wb");
|
||||
if (!host_client->upload) {
|
||||
Con_Printf ("Can't create %s\n", host_client->uploadfn);
|
||||
SV_Printf ("Can't create %s\n", host_client->uploadfn);
|
||||
ClientReliableWrite_Begin (host_client, svc_stufftext, 8);
|
||||
ClientReliableWrite_String (host_client, "stopul");
|
||||
*host_client->uploadfn = 0;
|
||||
return;
|
||||
}
|
||||
Con_Printf ("Receiving %s from %d...\n", host_client->uploadfn,
|
||||
SV_Printf ("Receiving %s from %d...\n", host_client->uploadfn,
|
||||
host_client->userid);
|
||||
if (host_client->remote_snap)
|
||||
OutofBandPrintf (host_client->snap_from,
|
||||
|
@ -641,7 +641,7 @@ SV_NextUpload (void)
|
|||
Qclose (host_client->upload);
|
||||
host_client->upload = NULL;
|
||||
|
||||
Con_Printf ("%s upload completed.\n", host_client->uploadfn);
|
||||
SV_Printf ("%s upload completed.\n", host_client->uploadfn);
|
||||
|
||||
if (host_client->remote_snap) {
|
||||
char *p;
|
||||
|
@ -730,7 +730,7 @@ SV_BeginDownload_f (void)
|
|||
host_client->download = NULL;
|
||||
}
|
||||
|
||||
Con_Printf ("Couldn't download %s to %s\n", name, host_client->name);
|
||||
SV_Printf ("Couldn't download %s to %s\n", name, host_client->name);
|
||||
ClientReliableWrite_Begin (host_client, svc_download, 4);
|
||||
ClientReliableWrite_Short (host_client, -1);
|
||||
ClientReliableWrite_Byte (host_client, 0);
|
||||
|
@ -738,7 +738,7 @@ SV_BeginDownload_f (void)
|
|||
}
|
||||
|
||||
if (zip && strcmp (realname, name)) {
|
||||
Con_Printf ("download renamed to %s\n", realname);
|
||||
SV_Printf ("download renamed to %s\n", realname);
|
||||
ClientReliableWrite_Begin (host_client, svc_download,
|
||||
strlen (realname) + 5);
|
||||
ClientReliableWrite_Short (host_client, -2);
|
||||
|
@ -748,7 +748,7 @@ SV_BeginDownload_f (void)
|
|||
}
|
||||
|
||||
SV_NextDownload_f ();
|
||||
Con_Printf ("Downloading %s to %s\n", name, host_client->name);
|
||||
SV_Printf ("Downloading %s to %s\n", name, host_client->name);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -820,7 +820,7 @@ SV_Say (qboolean team)
|
|||
strncat (text, p, sizeof (text) - strlen (text));
|
||||
strncat (text, "\n", sizeof (text) - strlen (text));
|
||||
|
||||
Con_Printf ("%s", text);
|
||||
SV_Printf ("%s", text);
|
||||
|
||||
for (j = 0, client = svs.clients; j < MAX_CLIENTS; j++, client++) {
|
||||
if (client->state < cs_connected) // Clients connecting can hear.
|
||||
|
@ -1091,13 +1091,13 @@ SV_SetInfo_f (void)
|
|||
|
||||
|
||||
if (Cmd_Argc () == 1) {
|
||||
Con_Printf ("User info settings:\n");
|
||||
SV_Printf ("User info settings:\n");
|
||||
Info_Print (host_client->userinfo);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_Argc () != 3) {
|
||||
Con_Printf ("usage: setinfo [ <key> <value> ]\n");
|
||||
SV_Printf ("usage: setinfo [ <key> <value> ]\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1217,7 +1217,7 @@ SV_ExecuteUserCommand (char *s)
|
|||
|
||||
if (!u) {
|
||||
SV_BeginRedirect (RD_CLIENT);
|
||||
Con_Printf ("Bad user command: %s\n", Cmd_Argv (0));
|
||||
SV_Printf ("Bad user command: %s\n", Cmd_Argv (0));
|
||||
SV_EndRedirect ();
|
||||
} else {
|
||||
if (!u->no_redirect)
|
||||
|
@ -1534,7 +1534,7 @@ SV_RunCmd (usercmd_t *ucmd, qboolean inside)
|
|||
after = PM_TestPlayerPosition (pmove.origin);
|
||||
|
||||
if (SVFIELD (sv_player, health, float) > 0 && before && !after)
|
||||
Con_Printf ("player %s got stuck in playermove!!!!\n",
|
||||
SV_Printf ("player %s got stuck in playermove!!!!\n",
|
||||
host_client->name);
|
||||
}
|
||||
#else
|
||||
|
@ -1656,7 +1656,7 @@ SV_ExecuteClientMessage (client_t *cl)
|
|||
cl->delta_sequence = -1; // no delta unless requested
|
||||
while (1) {
|
||||
if (net_message->badread) {
|
||||
Con_Printf ("SV_ReadClientMessage: badread\n");
|
||||
SV_Printf ("SV_ReadClientMessage: badread\n");
|
||||
SV_DropClient (cl);
|
||||
return;
|
||||
}
|
||||
|
@ -1667,7 +1667,7 @@ SV_ExecuteClientMessage (client_t *cl)
|
|||
|
||||
switch (c) {
|
||||
default:
|
||||
Con_Printf ("SV_ReadClientMessage: unknown command char\n");
|
||||
SV_Printf ("SV_ReadClientMessage: unknown command char\n");
|
||||
SV_DropClient (cl);
|
||||
return;
|
||||
|
||||
|
|
|
@ -559,7 +559,7 @@ SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
|
|||
#ifdef PARANOID
|
||||
if (SV_HullPointContents (sv_hullmodel, mid, node->children[side])
|
||||
== CONTENTS_SOLID) {
|
||||
Con_Printf ("mid PointInHullSolid\n");
|
||||
SV_Printf ("mid PointInHullSolid\n");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -589,7 +589,7 @@ SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
|
|||
if (frac < 0) {
|
||||
trace->fraction = midf;
|
||||
VectorCopy (mid, trace->endpos);
|
||||
Con_Printf ("backup past 0\n");
|
||||
SV_Printf ("backup past 0\n");
|
||||
return false;
|
||||
}
|
||||
midf = p1f + (p2f - p1f) * frac;
|
||||
|
|
Loading…
Reference in a new issue