mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Added support for Q2's nextserver command (for when playing cinamatics)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@62 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
57f4282c26
commit
9b59991ab3
1 changed files with 23 additions and 1 deletions
|
@ -510,6 +510,22 @@ void SVQ2_BaseLines_f (void)
|
|||
MSG_WriteString (&host_client->netchan.message, va("cmd baselines %i %i\n",svs.spawncount, start) );
|
||||
}
|
||||
}
|
||||
|
||||
void SVQ2_NextServer_f (void)
|
||||
{
|
||||
if (!*sv.modelname && atoi(Cmd_Argv(1)) == svs.spawncount)
|
||||
{
|
||||
cvar_t *nsv = Cvar_FindVar("nextserver");
|
||||
if (!nsv || !*nsv->string)
|
||||
return;
|
||||
|
||||
svs.spawncount++; // make sure another doesn't sneak in
|
||||
|
||||
Cbuf_AddText(nsv->string, RESTRICT_LOCAL);
|
||||
Cbuf_AddText("\n", RESTRICT_LOCAL);
|
||||
Cvar_Set(nsv, "");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -2550,6 +2566,8 @@ ucmd_t ucmdsq2[] = {
|
|||
{"download", SV_BeginDownload_f},
|
||||
{"nextdl", SV_NextDownload_f},
|
||||
|
||||
{"nextserver", SVQ2_NextServer_f},
|
||||
|
||||
{"vote", SV_Vote_f},
|
||||
|
||||
#ifdef SVRANKING
|
||||
|
@ -2614,7 +2632,11 @@ void SV_ExecuteUserCommand (char *s, qboolean fromQC)
|
|||
{
|
||||
if (!fromQC)
|
||||
if (PR_UserCmd(s))
|
||||
{
|
||||
host_client = oldhost;
|
||||
SV_EndRedirect ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (sv_cmdlikercon.value && host_client->rankid)
|
||||
{
|
||||
|
@ -3914,7 +3936,7 @@ void SVQ2_ExecuteClientMessage (client_t *cl)
|
|||
cl->send_message = false; // don't reply, sequences have slipped
|
||||
|
||||
// save time for ping calculations
|
||||
cl->q2frames[cl->netchan.outgoing_sequence & UPDATE_MASK].senttime = realtime;
|
||||
cl->q2frames[cl->netchan.outgoing_sequence & Q2UPDATE_MASK].senttime = realtime;
|
||||
// cl->q2frames[cl->netchan.outgoing_sequence & UPDATE_MASK].ping_time = -1;
|
||||
|
||||
host_client = cl;
|
||||
|
|
Loading…
Reference in a new issue