Overhaul to console structure, a bit
This commit is contained in:
+14
-14
@@ -47,20 +47,20 @@ void SV_Protocol_f(void) {
|
||||
|
||||
switch (command::argc()) {
|
||||
case 1:
|
||||
Con_Printf("\"sv_protocol\" is \"%i\"\n", sv_protocol);
|
||||
console::info("\"sv_protocol\" is \"%i\"\n", sv_protocol);
|
||||
break;
|
||||
case 2:
|
||||
i = atoi(command::argv(1)->c_str());
|
||||
if (i != PROTOCOL_NETQUAKE && i != PROTOCOL_FITZQUAKE && i != PROTOCOL_RMQ)
|
||||
Con_Printf("sv_protocol must be %i or %i or %i\n", PROTOCOL_NETQUAKE, PROTOCOL_FITZQUAKE, PROTOCOL_RMQ);
|
||||
console::info("sv_protocol must be %i or %i or %i\n", PROTOCOL_NETQUAKE, PROTOCOL_FITZQUAKE, PROTOCOL_RMQ);
|
||||
else {
|
||||
sv_protocol = i;
|
||||
if (sv.active)
|
||||
Con_Printf("changes will not take effect until the next level load.\n");
|
||||
console::info("changes will not take effect until the next level load.\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Con_SafePrintf("usage: sv_protocol <protocol>\n");
|
||||
console::safe_print("usage: sv_protocol <protocol>\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -202,7 +202,7 @@ void SV_StartSound(edict_t *entity, int channel, const char *sample, int volume,
|
||||
}
|
||||
|
||||
if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) {
|
||||
Con_Printf("SV_StartSound: %s not precached\n", sample);
|
||||
console::info("SV_StartSound: %s not precached\n", sample);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ void SV_LocalSound(client_t *client, const char *sample) {
|
||||
break;
|
||||
}
|
||||
if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) {
|
||||
Con_Printf("SV_LocalSound: %s not precached\n", sample);
|
||||
console::info("SV_LocalSound: %s not precached\n", sample);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ void SV_ConnectClient(int clientnum) {
|
||||
|
||||
client = svs.clients + clientnum;
|
||||
|
||||
Con_DPrintf("Client %s connected\n", NET_QSocketGetAddressString(client->netconnection));
|
||||
console::debug("Client %s connected\n", NET_QSocketGetAddressString(client->netconnection));
|
||||
|
||||
edictnum = clientnum + 1;
|
||||
|
||||
@@ -619,7 +619,7 @@ void SV_WriteEntitiesToClient(edict_t *clent, sizebuf_t *msg) {
|
||||
if (msg->cursize + 40 > msg->maxsize) {
|
||||
//johnfitz -- less spammy overflow message
|
||||
if (!dev_overflows.packetsize || dev_overflows.packetsize + CONSOLE_RESPAM_TIME < realtime) {
|
||||
Con_Printf("Packet overflow!\n");
|
||||
console::info("Packet overflow!\n");
|
||||
dev_overflows.packetsize = realtime;
|
||||
}
|
||||
goto stats;
|
||||
@@ -759,7 +759,7 @@ void SV_WriteEntitiesToClient(edict_t *clent, sizebuf_t *msg) {
|
||||
//johnfitz -- devstats
|
||||
stats:
|
||||
if (msg->cursize > 1024 && dev_peakstats.packetsize <= 1024)
|
||||
Con_DWarning("%i byte packet exceeds standard limit of 1024 (max = %d).\n", msg->cursize, msg->maxsize);
|
||||
console::dev_warn("%i byte packet exceeds standard limit of 1024 (max = %d).\n", msg->cursize, msg->maxsize);
|
||||
dev_stats.packetsize = msg->cursize;
|
||||
dev_peakstats.packetsize = std::max(msg->cursize, dev_peakstats.packetsize);
|
||||
//johnfitz
|
||||
@@ -1380,7 +1380,7 @@ void SV_SpawnServer(const char *server) {
|
||||
convar::set("hostname", "UNNAMED");
|
||||
scr_centertime_off = 0;
|
||||
|
||||
Con_DPrintf("SpawnServer: %s\n", server);
|
||||
console::debug("SpawnServer: %s\n", server);
|
||||
svs.changelevel_issued = false; // now safe to issue another
|
||||
|
||||
//
|
||||
@@ -1454,7 +1454,7 @@ void SV_SpawnServer(const char *server) {
|
||||
q_snprintf(sv.modelname, sizeof(sv.modelname), "maps/%s.bsp", server);
|
||||
sv.worldmodel = Mod_ForName(sv.modelname, false);
|
||||
if (!sv.worldmodel) {
|
||||
Con_Printf("Couldn't spawn server %s\n", sv.modelname);
|
||||
console::info("Couldn't spawn server %s\n", sv.modelname);
|
||||
sv.active = false;
|
||||
return;
|
||||
}
|
||||
@@ -1513,10 +1513,10 @@ void SV_SpawnServer(const char *server) {
|
||||
for (i = 0, signonsize = 0; i < sv.num_signon_buffers; i++)
|
||||
signonsize += sv.signon_buffers[i]->cursize;
|
||||
if (signonsize > 64000 - 2)
|
||||
Con_DWarning("%i byte signon buffer exceeds QS limit of 63998.\n", signonsize);
|
||||
console::dev_warn("%i byte signon buffer exceeds QS limit of 63998.\n", signonsize);
|
||||
else if (signonsize > 8000 - 2)
|
||||
//max size that will fit into 8000-sized client->message buffer with 2 extra bytes on the end
|
||||
Con_DWarning("%i byte signon buffer exceeds standard limit of 7998.\n", signonsize);
|
||||
console::dev_warn("%i byte signon buffer exceeds standard limit of 7998.\n", signonsize);
|
||||
//johnfitz
|
||||
|
||||
// send serverinfo to all connected clients
|
||||
@@ -1524,5 +1524,5 @@ void SV_SpawnServer(const char *server) {
|
||||
if (host_client->active)
|
||||
SV_SendServerinfo(host_client);
|
||||
|
||||
Con_DPrintf("Server spawned.\n");
|
||||
console::debug("Server spawned.\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user