Removed some utterly hideous coding style.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@807 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
f09294cc07
commit
6b9650f045
1 changed files with 10 additions and 4 deletions
|
@ -1138,6 +1138,8 @@ void SV_SpawnSpectator (void)
|
||||||
sv_player->v.movetype = MOVETYPE_NOCLIP;
|
sv_player->v.movetype = MOVETYPE_NOCLIP;
|
||||||
|
|
||||||
// search for an info_playerstart to spawn the spectator at
|
// search for an info_playerstart to spawn the spectator at
|
||||||
|
//this is only useful when a mod doesn't nativly support spectators. old qw on nq mods.
|
||||||
|
|
||||||
for (i=MAX_CLIENTS+1 ; i<sv.num_edicts ; i++)
|
for (i=MAX_CLIENTS+1 ; i<sv.num_edicts ; i++)
|
||||||
{
|
{
|
||||||
e = EDICT_NUM(svprogfuncs, i);
|
e = EDICT_NUM(svprogfuncs, i);
|
||||||
|
@ -2696,12 +2698,14 @@ void Cmd_Observe_f (void)
|
||||||
if (host_client->spectator)
|
if (host_client->spectator)
|
||||||
return; // already a spectator
|
return; // already a spectator
|
||||||
|
|
||||||
if (!(host_client->zquake_extensions & Z_EXT_JOIN_OBSERVE)) {
|
if (!(host_client->zquake_extensions & Z_EXT_JOIN_OBSERVE))
|
||||||
|
{
|
||||||
Con_Printf ("Your QW client doesn't support this command\n");
|
Con_Printf ("Your QW client doesn't support this command\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spectator_password.string[0] && stricmp(spectator_password.string, "none")) {
|
if (spectator_password.string[0] && stricmp(spectator_password.string, "none"))
|
||||||
|
{
|
||||||
Con_Printf ("This server requires a %s password. Please disconnect, set the password and reconnect as %s.\n", "spectator", "spectator");
|
Con_Printf ("This server requires a %s password. Please disconnect, set the password and reconnect as %s.\n", "spectator", "spectator");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2712,7 +2716,8 @@ void Cmd_Observe_f (void)
|
||||||
if (cl->state != cs_free && cl->spectator)
|
if (cl->state != cs_free && cl->spectator)
|
||||||
numspectators++;
|
numspectators++;
|
||||||
}
|
}
|
||||||
if (numspectators >= maxspectators.value) {
|
if (numspectators >= maxspectators.value)
|
||||||
|
{
|
||||||
Con_Printf ("Can't join, all spectator slots full\n");
|
Con_Printf ("Can't join, all spectator slots full\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2739,7 +2744,8 @@ void Cmd_Observe_f (void)
|
||||||
SV_SpawnSpectator ();
|
SV_SpawnSpectator ();
|
||||||
|
|
||||||
// call the spawn function
|
// call the spawn function
|
||||||
if (SpectatorConnect) {
|
if (SpectatorConnect)
|
||||||
|
{
|
||||||
pr_global_struct->time = sv.time;
|
pr_global_struct->time = sv.time;
|
||||||
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, sv_player);
|
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, sv_player);
|
||||||
PR_ExecuteProgram (svprogfuncs, SpectatorConnect);
|
PR_ExecuteProgram (svprogfuncs, SpectatorConnect);
|
||||||
|
|
Loading…
Reference in a new issue