X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=host_cmd.c;h=507188bf2d4f0c8fc78746b941af2def076c84e3;hb=1379b5eec769986c83c7de2ba63fd581de7ea147;hp=3934de448280002ab5a4ba86f28f85621d6c5689;hpb=069527b0cff9d91784bba159329e01b0b94df752;p=xonotic%2Fdarkplaces.git diff --git a/host_cmd.c b/host_cmd.c index 3934de44..507188bf 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -30,19 +30,9 @@ Host_Quit_f ================== */ -// LordHavoc: didn't like it asking me if I wanted to quit -//extern void M_Menu_Quit_f (void); - extern qboolean host_shuttingdown; void Host_Quit_f (void) { - /* - if (key_dest != key_console && cls.state != ca_dedicated) - { - M_Menu_Quit_f (); - return; - } - */ host_shuttingdown = true; CL_Disconnect (); Host_ShutdownServer(false); @@ -251,15 +241,15 @@ SERVER TRANSITIONS ====================== Host_Map_f -handle a +handle a map 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; @@ -269,7 +259,7 @@ void Host_Map_f (void) SCR_BeginLoadingPlaque (); CL_Disconnect (); - Host_ShutdownServer(false); + Host_ShutdownServer(false); key_dest = key_game; // remove console or menu @@ -286,9 +276,10 @@ void Host_Map_f (void) SV_SpawnServer (name); if (!sv.active) return; - + if (cls.state != ca_dedicated) { + /* strcpy (cls.spawnparms, ""); for (i=2 ; i> 4, cl_color.integer & 15); - Con_Printf ("color <0-13> [0-13]\n"); + Con_Printf ("color <0-15> [0-15]\n"); return; } @@ -884,7 +871,7 @@ void Host_Color_f(void) // LordHavoc: allow skin colormaps 14 and 15 (was 13) if (bottom > 15) bottom = 15; - + playercolor = top*16 + bottom; if (cmd_source == src_command) @@ -895,12 +882,11 @@ void Host_Color_f(void) return; } - // void(float color) SV_ChangeTeam; if ((f = ED_FindFunction ("SV_ChangeTeam")) && (SV_ChangeTeam = (func_t)(f - pr_functions))) { 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, ""); } @@ -1034,7 +1020,8 @@ void Host_Spawn_f (void) // 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; @@ -1094,7 +1081,7 @@ void Host_Spawn_f (void) MSG_WriteByte (&host_client->message, i); MSG_WriteByte (&host_client->message, client->colors); } - + // send all current light styles for (i=0 ; imessage, STAT_MONSTERS); MSG_WriteLong (&host_client->message, pr_global_struct->killed_monsters); -// // send a fixangle // Never send a roll angle, because savegames can catch the server // in a state where it is expecting the client to correct the angle @@ -1662,3 +1648,4 @@ void Host_InitCommands (void) Cmd_AddCommand ("viewnext", Host_Viewnext_f); Cmd_AddCommand ("viewprev", Host_Viewprev_f); } +