======================
Host_Map_f
-handle a
+handle a
map <servername>
command from the console. Active clients are kicked off.
======================
*/
void Host_Map_f (void)
{
- int i;
- char name[MAX_QPATH];
+ int i;
+ char name[MAX_QPATH];
if (cmd_source != src_command)
return;
SCR_BeginLoadingPlaque ();
CL_Disconnect ();
- Host_ShutdownServer(false);
+ Host_ShutdownServer(false);
key_dest = key_game; // remove console or menu
SV_SpawnServer (name);
if (!sv.active)
return;
-
+
if (cls.state != ca_dedicated)
{
+ /*
strcpy (cls.spawnparms, "");
for (i=2 ; i<Cmd_Argc() ; i++)
strcat (cls.spawnparms, Cmd_Argv(i));
strcat (cls.spawnparms, " ");
}
-
+ */
Cmd_ExecuteString ("connect local", src_command);
- }
+ }
}
/*
int playercolor;
dfunction_t *f;
func_t SV_ChangeTeam;
-
+
if (Cmd_Argc() == 1)
{
Con_Printf ("\"color\" is \"%i %i\"\n", cl_color.integer >> 4, cl_color.integer & 15);
- Con_Printf ("color <0-13> [0-13]\n");
+ Con_Printf ("color <0-15> [0-15]\n");
return;
}
// LordHavoc: allow skin colormaps 14 and 15 (was 13)
if (bottom > 15)
bottom = 15;
-
+
playercolor = top*16 + bottom;
if (cmd_source == src_command)
{
Con_DPrintf("Calling SV_ChangeTeam\n");
pr_global_struct->time = sv.time;
- pr_globals[0] = playercolor;
+ pr_globals[OFS_PARM0] = playercolor;
pr_global_struct->self = EDICT_TO_PROG(host_client->edict);
PR_ExecuteProgram (SV_ChangeTeam, "");
}
// run the entrance script
if (sv.loadgame)
- { // loaded games are fully inited already
+ {
+ // loaded games are fully initialized already
// if this is the last client to be connected, unpause
sv.paused = false;
MSG_WriteByte (&host_client->message, i);
MSG_WriteByte (&host_client->message, client->colors);
}
-
+
// send all current light styles
for (i=0 ; i<MAX_LIGHTSTYLES ; i++)
{