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
+17 -17
View File
@@ -174,7 +174,7 @@ int CL_GetMessage (void)
// discard nop keepalive message
if (net_message.cursize == 1 && net_message.data[0] == svc_nop)
Con_Printf ("<-- server to client keepalive\n");
console::info ("<-- server to client keepalive\n");
else
break;
}
@@ -208,7 +208,7 @@ void CL_Stop_f (void)
if (!cls.demorecording)
{
Con_Printf ("Not recording a demo.\n");
console::info ("Not recording a demo.\n");
return;
}
@@ -221,7 +221,7 @@ void CL_Stop_f (void)
fclose (cls.demofile);
cls.demofile = NULL;
cls.demorecording = false;
Con_Printf ("Completed demo\n");
console::info ("Completed demo\n");
// ericw -- update demo tab-completion list
DemoList_Rebuild ();
@@ -245,7 +245,7 @@ void CL_Record_f (void)
if (cls.demoplayback)
{
Con_Printf ("Can't record during demo playback\n");
console::info ("Can't record during demo playback\n");
return;
}
@@ -255,25 +255,25 @@ void CL_Record_f (void)
c = command::argc();
if (c != 2 && c != 3 && c != 4)
{
Con_Printf ("record <demoname> [<map> [cd track]]\n");
console::info ("record <demoname> [<map> [cd track]]\n");
return;
}
if (strstr(command::argv(1).value_or("").c_str(), ".."))
{
Con_Printf ("Relative pathnames are not allowed.\n");
console::info ("Relative pathnames are not allowed.\n");
return;
}
if (c == 2 && cls.state == ca_connected)
{
#if 0
Con_Printf("Can not record - already connected to server\nClient demo recording must be started before connecting\n");
console::info("Can not record - already connected to server\nClient demo recording must be started before connecting\n");
return;
#endif
if (cls.signon < 2)
{
Con_Printf("Can't record - try again when connected\n");
console::info("Can't record - try again when connected\n");
return;
}
}
@@ -282,7 +282,7 @@ void CL_Record_f (void)
if (c == 4)
{
track = atoi(command::argv(3)->c_str());
Con_Printf ("Forcing CD track to %i\n", cls.forcetrack);
console::info ("Forcing CD track to %i\n", cls.forcetrack);
}
else
{
@@ -302,11 +302,11 @@ void CL_Record_f (void)
// open the demo file
COM_AddExtension (name, ".dem", sizeof(name));
Con_Printf ("recording to %s.\n", name);
console::info ("recording to %s.\n", name);
cls.demofile = fopen (name, "wb");
if (!cls.demofile)
{
Con_Printf ("ERROR: couldn't create %s\n", name);
console::info ("ERROR: couldn't create %s\n", name);
return;
}
@@ -409,7 +409,7 @@ void CL_PlayDemo_f (void)
if (command::argc() != 2)
{
Con_Printf ("playdemo <demoname> : plays a demo\n");
console::info ("playdemo <demoname> : plays a demo\n");
return;
}
@@ -420,12 +420,12 @@ void CL_PlayDemo_f (void)
std::strncpy(name, command::argv(1).value_or("").c_str(), sizeof(name));
COM_AddExtension (name, ".dem", sizeof(name));
Con_Printf ("Playing demo from %s.\n", name);
console::info ("Playing demo from %s.\n", name);
COM_FOpenFile (name, &cls.demofile, NULL);
if (!cls.demofile)
{
Con_Printf ("ERROR: couldn't open %s\n", name);
console::info ("ERROR: couldn't open %s\n", name);
cls.demonum = -1; // stop demo loop
return;
}
@@ -439,7 +439,7 @@ void CL_PlayDemo_f (void)
fclose (cls.demofile);
cls.demofile = NULL;
cls.demonum = -1; // stop demo loop
Con_Printf ("ERROR: demo \"%s\" is invalid\n", name);
console::info ("ERROR: demo \"%s\" is invalid\n", name);
return;
}
@@ -469,7 +469,7 @@ static void CL_FinishTimeDemo (void)
time = realtime - cls.td_starttime;
if (!time)
time = 1;
Con_Printf ("%i frames %5.1f seconds %5.1f fps\n", frames, time, frames/time);
console::info ("%i frames %5.1f seconds %5.1f fps\n", frames, time, frames/time);
}
/*
@@ -486,7 +486,7 @@ void CL_TimeDemo_f (void)
if (command::argc() != 2)
{
Con_Printf ("timedemo <demoname> : gets demo speeds\n");
console::info ("timedemo <demoname> : gets demo speeds\n");
return;
}