Overhaul to console structure, a bit

This commit is contained in:
iikorni
2026-08-30 00:50:23 -05:00
parent de75b014b3
commit 216dd1aecd
70 changed files with 2081 additions and 2260 deletions
+12 -12
View File
@@ -82,7 +82,7 @@ static char *PF_VarString (int first)
s = q_strlcat(out, LOC_GetString(G_STRING(OFS_PARM0+i*3)), sizeof(out));
if (s >= sizeof(out))
{
Con_Warning("PF_VarString: overflow (string truncated)\n");
console::warn("PF_VarString: overflow (string truncated)\n");
return out;
}
}
@@ -91,7 +91,7 @@ static char *PF_VarString (int first)
{
if (!dev_overflows.varstring || dev_overflows.varstring + CONSOLE_RESPAM_TIME < realtime)
{
Con_DWarning("PF_VarString: %i characters exceeds standard limit of 255 (max = %d).\n",
console::dev_warn("PF_VarString: %i characters exceeds standard limit of 255 (max = %d).\n",
(int) s, (int)(sizeof(out) - 1));
dev_overflows.varstring = realtime;
}
@@ -116,7 +116,7 @@ static void PF_error (void)
edict_t *ed;
s = PF_VarString(0);
Con_Printf ("======SERVER ERROR in %s:\n%s\n",
console::info ("======SERVER ERROR in %s:\n%s\n",
PR_GetString(pr_xfunction->s_name), s);
ed = PROG_TO_EDICT(pr_global_struct->self);
ED_Print (ed);
@@ -140,7 +140,7 @@ static void PF_objerror (void)
edict_t *ed;
s = PF_VarString(0);
Con_Printf ("======OBJECT ERROR in %s:\n%s\n",
console::info ("======OBJECT ERROR in %s:\n%s\n",
PR_GetString(pr_xfunction->s_name), s);
ed = PROG_TO_EDICT(pr_global_struct->self);
ED_Print (ed);
@@ -368,7 +368,7 @@ static void PF_sprint (void)
if (entnum < 1 || entnum > svs.maxclients)
{
Con_Printf ("tried to sprint to a non-client\n");
console::info ("tried to sprint to a non-client\n");
return;
}
@@ -399,7 +399,7 @@ static void PF_centerprint (void)
if (entnum < 1 || entnum > svs.maxclients)
{
Con_Printf ("tried to sprint to a non-client\n");
console::info ("tried to sprint to a non-client\n");
return;
}
@@ -595,7 +595,7 @@ static void PF_ambientsound (void)
if (!*check)
{
Con_Printf ("no precache: %s\n", samp);
console::info ("no precache: %s\n", samp);
return;
}
@@ -676,7 +676,7 @@ break()
*/
static void PF_break (void)
{
Con_Printf ("break statement\n");
console::info ("break statement\n");
*(int *)-4 = 0; // dump to debugger
// PR_RunError ("break statement");
}
@@ -708,7 +708,7 @@ static void PF_traceline (void)
if (developer.value) {
if (IS_NAN(v1[0]) || IS_NAN(v1[1]) || IS_NAN(v1[2]) ||
IS_NAN(v2[0]) || IS_NAN(v2[1]) || IS_NAN(v2[2])) {
Con_Warning ("NAN in traceline:\nv1(%f %f %f) v2(%f %f %f)\nentity %d\n",
console::warn ("NAN in traceline:\nv1(%f %f %f) v2(%f %f %f)\nentity %d\n",
v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], NUM_FOR_EDICT(ent));
}
}
@@ -1008,7 +1008,7 @@ PF_dprint
*/
static void PF_dprint (void)
{
Con_DPrintf ("%s",PF_VarString(0));
console::debug ("%s",PF_VarString(0));
}
static void PF_ftos (void)
@@ -1269,7 +1269,7 @@ static void PF_lightstyle (void)
// bounds check to avoid clobbering sv struct
if (style < 0 || style >= MAX_LIGHTSTYLES)
{
Con_DWarning("PF_lightstyle: invalid style %d\n", style);
console::dev_warn("PF_lightstyle: invalid style %d\n", style);
return;
}
@@ -1733,7 +1733,7 @@ static void PF_localsound (void)
entnum = G_EDICTNUM(OFS_PARM0);
sample = G_STRING(OFS_PARM1);
if (entnum < 1 || entnum > svs.maxclients) {
Con_Printf ("tried to localsound to a non-client\n");
console::info ("tried to localsound to a non-client\n");
return;
}
SV_LocalSound (&svs.clients[entnum-1], sample);