X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=host_cmd.c;h=7a533d9b2d2893f36670b870d96fdffab238da75;hb=9176bd39d627c6c595248482662f50acee8d3942;hp=654abb553bdeee0015e6074cfa55f0a4b7f583be;hpb=3ec243e3da001772d9e1676c2ea599ebac8071b7;p=xonotic%2Fdarkplaces.git diff --git a/host_cmd.c b/host_cmd.c index 654abb55..7a533d9b 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -223,7 +223,7 @@ void Host_Ping_f (void) { if (!client->active) continue; - SV_ClientPrintf("%4i %s\n", (int)(client->ping*1000), client->name); + SV_ClientPrintf("%4i %s\n", (int)floor(client->ping*1000+0.5), client->name); } } @@ -369,6 +369,11 @@ This is sent just before a server changes levels */ void Host_Reconnect_f (void) { + if (cmd_source == src_command) + { + Con_Print("reconnect is not valid from the console\n"); + return; + } if (Cmd_Argc() != 1) { Con_Print("reconnect : wait for signon messages again\n"); @@ -430,12 +435,14 @@ void Host_SavegameComment (char *text) for (i=0 ; iedict, eval_playermodel)->string = PRVM_SetEngineString(host_client->playermodel); if (strcmp(host_client->old_model, host_client->playermodel)) { - if (host_client->spawned) - SV_BroadcastPrintf("%s changed model to %s\n", host_client->name, host_client->playermodel); strcpy(host_client->old_model, host_client->playermodel); /*// send notification to all clients MSG_WriteByte (&sv.reliable_datagram, svc_updatepmodel); @@ -926,9 +931,9 @@ void Host_Say(qboolean teamonly) p1++; } if (!fromServer) - dpsnprintf (text, sizeof(text), "%c%s: %s", 1, host_client->name, p1); + dpsnprintf (text, sizeof(text), "%c%s" STRING_COLOR_DEFAULT_STR ": %s", 1, host_client->name, p1); else - dpsnprintf (text, sizeof(text), "%c<%s> %s", 1, hostname.string, p1); + dpsnprintf (text, sizeof(text), "%c<%s" STRING_COLOR_DEFAULT_STR "> %s", 1, hostname.string, p1); p2 = text + strlen(text); while ((const char *)p2 > (const char *)text && (p2[-1] == '\r' || p2[-1] == '\n' || (p2[-1] == '\"' && quoted))) { @@ -1674,9 +1679,9 @@ void Host_Viewmodel_f (void) return; m = Mod_ForName (Cmd_Argv(1), false, true, false); - if (!m) + if (!m || !m->loaded || !m->Draw) { - Con_Printf("Can't load %s\n", Cmd_Argv(1)); + Con_Printf("viewmodel: can't load %s\n", Cmd_Argv(1)); return; } @@ -1794,7 +1799,7 @@ void Host_Startdemos_f (void) { int i, c; - if (cls.state == ca_dedicated || COM_CheckParm("-listen")) + if (cls.state == ca_dedicated || COM_CheckParm("-listen") || COM_CheckParm("-benchmark") || COM_CheckParm("-demo") || COM_CheckParm("-demolooponly")) return; c = Cmd_Argc() - 1;