Overhaul to console structure, a bit
This commit is contained in:
+26
-26
@@ -260,7 +260,7 @@ void CL_KeepaliveMessage(void) {
|
||||
lastmsg = time;
|
||||
|
||||
// write out a nop
|
||||
Con_Printf("--> client to server keepalive\n");
|
||||
console::info("--> client to server keepalive\n");
|
||||
|
||||
MSG_WriteByte(&cls.message, clc_nop);
|
||||
NET_SendMessage(cls.netcon, &cls.message);
|
||||
@@ -279,7 +279,7 @@ void CL_ParseServerInfo(void) {
|
||||
char model_precache[MAX_MODELS][MAX_QPATH];
|
||||
char sound_precache[MAX_SOUNDS][MAX_QPATH];
|
||||
|
||||
Con_DPrintf("Serverinfo packet received.\n");
|
||||
console::debug("Serverinfo packet received.\n");
|
||||
|
||||
// ericw -- bring up loading plaque for map changes within a demo.
|
||||
// it will be hidden in CL_SignonReply.
|
||||
@@ -295,7 +295,7 @@ void CL_ParseServerInfo(void) {
|
||||
i = MSG_ReadLong();
|
||||
//johnfitz -- support multiple protocols
|
||||
if (i != PROTOCOL_NETQUAKE && i != PROTOCOL_FITZQUAKE && i != PROTOCOL_RMQ) {
|
||||
Con_Printf("\n"); //because there's no newline after serverinfo print
|
||||
console::info("\n"); //because there's no newline after serverinfo print
|
||||
Host_Error("Server returned version %i, not %i or %i or %i", i, PROTOCOL_NETQUAKE, PROTOCOL_FITZQUAKE,
|
||||
PROTOCOL_RMQ);
|
||||
}
|
||||
@@ -310,7 +310,7 @@ void CL_ParseServerInfo(void) {
|
||||
cl.protocolflags = (unsigned int) MSG_ReadLong();
|
||||
|
||||
if (0 != (cl.protocolflags & (~supportedflags))) {
|
||||
Con_Warning("PROTOCOL_RMQ protocolflags %i contains unsupported flags\n", cl.protocolflags);
|
||||
console::warn("PROTOCOL_RMQ protocolflags %i contains unsupported flags\n", cl.protocolflags);
|
||||
}
|
||||
} else cl.protocolflags = 0;
|
||||
|
||||
@@ -329,11 +329,11 @@ void CL_ParseServerInfo(void) {
|
||||
std::strncpy(cl.levelname, str, sizeof(cl.levelname));
|
||||
|
||||
// seperate the printfs so the server message can have a color
|
||||
Con_Printf("\n%s\n", Con_Quakebar(40)); //johnfitz
|
||||
Con_Printf("%c%s\n", 2, str);
|
||||
console::info("\n%s\n", Con_Quakebar(40)); //johnfitz
|
||||
console::info("%c%s\n", 2, str);
|
||||
|
||||
//johnfitz -- tell user which protocol this is
|
||||
Con_Printf("Using protocol %i\n", i);
|
||||
console::info("Using protocol %i\n", i);
|
||||
|
||||
// first we go through and touch all of the precache data that still
|
||||
// happens to be in the cache, so precaching something else doesn't
|
||||
@@ -354,7 +354,7 @@ void CL_ParseServerInfo(void) {
|
||||
|
||||
//johnfitz -- check for excessive models
|
||||
if (nummodels >= 256)
|
||||
Con_DWarning("%i models exceeds standard limit of 256 (max = %d).\n", nummodels, MAX_MODELS);
|
||||
console::dev_warn("%i models exceeds standard limit of 256 (max = %d).\n", nummodels, MAX_MODELS);
|
||||
//johnfitz
|
||||
|
||||
// precache sounds
|
||||
@@ -372,7 +372,7 @@ void CL_ParseServerInfo(void) {
|
||||
|
||||
//johnfitz -- check for excessive sounds
|
||||
if (numsounds >= 256)
|
||||
Con_DWarning("%i sounds exceeds standard limit of 256 (max = %d).\n", numsounds, MAX_SOUNDS);
|
||||
console::dev_warn("%i sounds exceeds standard limit of 256 (max = %d).\n", numsounds, MAX_SOUNDS);
|
||||
//johnfitz
|
||||
|
||||
//
|
||||
@@ -578,7 +578,7 @@ void CL_ParseUpdate(int bits) {
|
||||
float a, b;
|
||||
|
||||
if (warn_about_nehahra_protocol) {
|
||||
Con_Warning("nonstandard update bit, assuming Nehahra protocol\n");
|
||||
console::warn("nonstandard update bit, assuming Nehahra protocol\n");
|
||||
warn_about_nehahra_protocol = false;
|
||||
}
|
||||
|
||||
@@ -908,33 +908,33 @@ static void CL_DumpPacket(void) {
|
||||
int i, pos;
|
||||
unsigned char *packet = net_message.data;
|
||||
|
||||
Con_Printf("CL_DumpPacket, BEGIN:\n");
|
||||
console::info("CL_DumpPacket, BEGIN:\n");
|
||||
pos = 0;
|
||||
while (pos < net_message.cursize) {
|
||||
Con_Printf("%5i ", pos);
|
||||
console::info("%5i ", pos);
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (pos >= net_message.cursize)
|
||||
Con_Printf(" X ");
|
||||
else Con_Printf("%2x ", packet[pos]);
|
||||
console::info(" X ");
|
||||
else console::info("%2x ", packet[pos]);
|
||||
pos++;
|
||||
}
|
||||
pos -= 16;
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (pos >= net_message.cursize)
|
||||
Con_Printf("X");
|
||||
console::info("X");
|
||||
else if (packet[pos] == 0)
|
||||
Con_Printf(".");
|
||||
else Con_Printf("%c", packet[pos]);
|
||||
console::info(".");
|
||||
else console::info("%c", packet[pos]);
|
||||
pos++;
|
||||
}
|
||||
Con_Printf("\n");
|
||||
console::info("\n");
|
||||
}
|
||||
|
||||
Con_Printf("CL_DumpPacket, --- END ---\n");
|
||||
console::info("CL_DumpPacket, --- END ---\n");
|
||||
}
|
||||
#endif /* CL_DumpPacket */
|
||||
|
||||
#define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
|
||||
#define SHOWNET(x) if(cl_shownet.value==2)console::info ("%3i:%s\n", msg_readcount-1, x);
|
||||
|
||||
/*
|
||||
=====================
|
||||
@@ -951,9 +951,9 @@ void CL_ParseServerMessage(void) {
|
||||
// if recording demos, copy the message out
|
||||
//
|
||||
if (cl_shownet.value == 1)
|
||||
Con_Printf("%i ", net_message.cursize);
|
||||
console::info("%i ", net_message.cursize);
|
||||
else if (cl_shownet.value == 2)
|
||||
Con_Printf("------------------\n");
|
||||
console::info("------------------\n");
|
||||
|
||||
// cl.onground = false; // unless the server says otherwise
|
||||
|
||||
@@ -995,7 +995,7 @@ void CL_ParseServerMessage(void) {
|
||||
break;
|
||||
|
||||
case svc_nop:
|
||||
// Con_Printf ("svc_nop\n");
|
||||
// console::info ("svc_nop\n");
|
||||
break;
|
||||
|
||||
case svc_time:
|
||||
@@ -1022,7 +1022,7 @@ void CL_ParseServerMessage(void) {
|
||||
Host_EndGame("Server disconnected\n");
|
||||
|
||||
case svc_print:
|
||||
Con_Printf("%s", MSG_ReadString());
|
||||
console::info("%s", MSG_ReadString());
|
||||
break;
|
||||
|
||||
case svc_centerprint:
|
||||
@@ -1146,7 +1146,7 @@ void CL_ParseServerMessage(void) {
|
||||
//johnfitz -- if signonnum==2, signon packet has been fully parsed, so check for excessive static ents and efrags
|
||||
if (i == 2) {
|
||||
if (cl.num_statics > 128)
|
||||
Con_DWarning("%i static entities exceeds standard limit of 128 (max = %d).\n", cl.num_statics,
|
||||
console::dev_warn("%i static entities exceeds standard limit of 128 (max = %d).\n", cl.num_statics,
|
||||
MAX_STATIC_ENTITIES);
|
||||
R_CheckEfrags();
|
||||
}
|
||||
@@ -1248,7 +1248,7 @@ void CL_ParseServerMessage(void) {
|
||||
//used by the 2021 rerelease
|
||||
case svc_achievement:
|
||||
str = MSG_ReadString();
|
||||
Con_DPrintf("Ignoring svc_achievement (%s)\n", str);
|
||||
console::debug("Ignoring svc_achievement (%s)\n", str);
|
||||
break;
|
||||
case svc_localsound:
|
||||
CL_ParseLocalSound();
|
||||
|
||||
Reference in New Issue
Block a user