dpvsnprintf (hosterrorstring1,sizeof(hosterrorstring1),error,argptr);
va_end (argptr);
- Con_Errorf("Host_Error: %s\n", hosterrorstring1);
+ Con_Printf(CON_ERROR "Host_Error: %s\n", hosterrorstring1);
// LadyHavoc: if crashing very early, or currently shutting down, do
// Sys_Error instead
Cvar_SetValueQuick(&deathmatch, 1);
}
+/*
+==================
+Host_Quit_f
+==================
+*/
+void Host_Quit_f(cmd_state_t *cmd)
+{
+ if(host.state == host_shutdown)
+ Con_Printf("shutting down already!\n");
+ else
+ host.state = host_shutdown;
+}
+
+static void Host_Version_f(cmd_state_t *cmd)
+{
+ Con_Printf("Version: %s build %s\n", gamename, buildstring);
+}
+
/*
=======================
Host_InitLocal
extern cvar_t r_texture_jpeg_fastpicmip;
static void Host_InitLocal (void)
{
+ Cmd_AddCommand(CMD_SHARED, "quit", Host_Quit_f, "quit the game");
+ Cmd_AddCommand(CMD_SHARED, "version", Host_Version_f, "print engine version");
Cmd_AddCommand(CMD_SHARED, "saveconfig", Host_SaveConfig_f, "save settings to config.cfg (or a specified filename) immediately (also automatic when quitting)");
Cmd_AddCommand(CMD_SHARED, "loadconfig", Host_LoadConfig_f, "reset everything and reload configs");
Cvar_RegisterVariable (&cl_maxphysicsframesperserverframe);
f = FS_OpenRealFile(file, "wb", false);
if (!f)
{
- Con_Errorf("Couldn't write %s.\n", file);
+ Con_Printf(CON_ERROR "Couldn't write %s.\n", file);
return;
}
{
// warn if it's significant
if (time < -0.01)
- Con_Warnf("Host_Mingled: time stepped backwards (went from %f to %f, difference %f)\n", oldtime, newtime, time);
+ Con_Printf(CON_WARN "Host_Mingled: time stepped backwards (went from %f to %f, difference %f)\n", oldtime, newtime, time);
time = 0;
}
else if (time >= 1800)
{
- Con_Warnf("Host_Mingled: time stepped forward (went from %f to %f, difference %f)\n", oldtime, newtime, time);
+ Con_Printf(CON_WARN "Host_Mingled: time stepped forward (went from %f to %f, difference %f)\n", oldtime, newtime, time);
time = 0;
}
host.realtime += time;
{
if(locksession.integer == 2)
{
- Con_Warnf("WARNING: session lock %s could not be acquired. Please run with -sessionid and an unique session name. Continuing anyway.\n", p);
+ Con_Printf(CON_WARN "WARNING: session lock %s could not be acquired. Please run with -sessionid and an unique session name. Continuing anyway.\n", p);
}
else
{