// holds weird values it may cause confusion...
if (!strcmp(var->name, "_cl_color"))
{
- CL_SetInfo("topcolor", va("%i", (var->integer >> 4) & 15), true, false, false, false);
- CL_SetInfo("bottomcolor", va("%i", (var->integer) & 15), true, false, false, false);
+ int top = (var->integer >> 4) & 15, bottom = var->integer & 15;
+ CL_SetInfo("topcolor", va("%i", top), true, false, false, false);
+ CL_SetInfo("bottomcolor", va("%i", bottom), true, false, false, false);
+ if (cls.protocol != PROTOCOL_QUAKEWORLD && cls.netcon)
+ {
+ MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
+ MSG_WriteString(&cls.netcon->message, va("color %i %i", top, bottom));
+ }
}
else if (!strcmp(var->name, "_cl_rate"))
CL_SetInfo("rate", va("%i", var->integer), true, false, false, false);
SV_SpawnServer(level);
if (sv.active && cls.state == ca_disconnected)
CL_EstablishConnection("local:1");
-
-#ifdef AUTODEMO_BROKEN
-// if cl_autodemo is set, automatically start recording a demo if one isn't being recorded already
- if (cl_autodemo.integer && !cls.demorecording)
- {
- char demofile[MAX_OSPATH];
-
- dpsnprintf (demofile, sizeof(demofile), "%s_%s.dem", Sys_TimeString (cl_autodemo_nameformat.string), level);
-
- Con_Printf ("Recording to %s.\n", demofile);
-
- cls.demofile = FS_Open (demofile, "wb", false, false);
- if (cls.demofile)
- {
- cls.forcetrack = -1;
- FS_Printf (cls.demofile, "%i\n", cls.forcetrack);
- }
- else
- Con_Print ("ERROR: couldn't open.\n");
-
- cls.demorecording = true;
- }
-#endif
}
/*
if (cmd_source == src_command)
{
Cvar_Set ("_cl_name", newName);
- CL_SetInfo("name", newName, true, false, false, false);
return;
}
if (cmd_source == src_command)
{
Cvar_Set ("_cl_playermodel", newPath);
- CL_SetInfo("playermodel", newPath, true, false, false, false);
return;
}
if (cmd_source == src_command)
{
Cvar_Set ("_cl_playerskin", newPath);
- CL_SetInfo("playerskin", newPath, true, false, false, false);
return;
}
if (cmd_source == src_command)
{
Cvar_SetValueQuick(&cl_color, playercolor);
- if (changetop >= 0)
- CL_SetInfo("topcolor", va("%i", top), true, false, false, false);
- if (changebottom >= 0)
- CL_SetInfo("bottomcolor", va("%i", bottom), true, false, false, false);
- if (cls.protocol != PROTOCOL_QUAKEWORLD && cls.netcon)
- {
- MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
- MSG_WriteString(&cls.netcon->message, va("color %i %i", top, bottom));
- }
return;
}
if (cmd_source == src_command)
{
Cvar_SetValue ("_cl_rate", max(NET_MINRATE, rate));
- CL_SetInfo("rate", va("%i", rate), true, false, false, false);
return;
}