minor tidy-ups

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@829 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2013-03-02 12:03:52 +00:00
parent 2b49965af0
commit 87c24f75ff

View file

@ -835,7 +835,7 @@ void Host_Map_f (void)
svs.serverflags = 0; // haven't completed an episode yet svs.serverflags = 0; // haven't completed an episode yet
q_strlcpy (name, Cmd_Argv(1), sizeof(name)); q_strlcpy (name, Cmd_Argv(1), sizeof(name));
// remove (any) trailing ".bsp" from mapname S.A. // remove (any) trailing ".bsp" from mapname -- S.A.
p = strstr(name, ".bsp"); p = strstr(name, ".bsp");
if (p && p[4] == '\0') if (p && p[4] == '\0')
*p = '\0'; *p = '\0';
@ -1297,16 +1297,13 @@ void Host_Say(qboolean teamonly)
if (cmd_source == src_command) if (cmd_source == src_command)
{ {
if (cls.state == ca_dedicated) if (cls.state != ca_dedicated)
{
fromServer = true;
teamonly = false;
}
else
{ {
Cmd_ForwardToServer (); Cmd_ForwardToServer ();
return; return;
} }
fromServer = true;
teamonly = false;
} }
if (Cmd_Argc () < 2) if (Cmd_Argc () < 2)
@ -1621,12 +1618,9 @@ void Host_Spawn_f (void)
ent->v.netname = PR_SetEngineString(host_client->name); ent->v.netname = PR_SetEngineString(host_client->name);
// copy spawn parms out of the client_t // copy spawn parms out of the client_t
for (i=0 ; i< NUM_SPAWN_PARMS ; i++) for (i=0 ; i< NUM_SPAWN_PARMS ; i++)
(&pr_global_struct->parm1)[i] = host_client->spawn_parms[i]; (&pr_global_struct->parm1)[i] = host_client->spawn_parms[i];
// call the spawn function // call the spawn function
pr_global_struct->time = sv.time; pr_global_struct->time = sv.time;
pr_global_struct->self = EDICT_TO_PROG(sv_player); pr_global_struct->self = EDICT_TO_PROG(sv_player);
PR_ExecuteProgram (pr_global_struct->ClientConnect); PR_ExecuteProgram (pr_global_struct->ClientConnect);
@ -1685,7 +1679,6 @@ void Host_Spawn_f (void)
MSG_WriteByte (&host_client->message, STAT_MONSTERS); MSG_WriteByte (&host_client->message, STAT_MONSTERS);
MSG_WriteLong (&host_client->message, pr_global_struct->killed_monsters); MSG_WriteLong (&host_client->message, pr_global_struct->killed_monsters);
// //
// send a fixangle // send a fixangle
// Never send a roll angle, because savegames can catch the server // Never send a roll angle, because savegames can catch the server
@ -1792,10 +1785,10 @@ void Host_Kick_f (void)
message = COM_Parse(Cmd_Args()); message = COM_Parse(Cmd_Args());
if (byNumber) if (byNumber)
{ {
message++; // skip the # message++; // skip the #
while (*message == ' ') // skip white space while (*message == ' ') // skip white space
message++; message++;
message += Q_strlen(Cmd_Argv(2)); // skip the number message += strlen(Cmd_Argv(2)); // skip the number
} }
while (*message && *message == ' ') while (*message && *message == ' ')
message++; message++;