From d804efe0cb6cbded3a94be322969a8b62fd61870 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 4 Mar 2007 19:17:16 +0000 Subject: [PATCH] This commit brought to you to shut up bigfoot. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2473 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/sbar.c | 1 + engine/server/pr_cmds.c | 11 +++++------ engine/server/server.h | 1 + engine/server/sv_ccmds.c | 8 +++++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/engine/client/sbar.c b/engine/client/sbar.c index cf95c2cbf..6d9049c78 100644 --- a/engine/client/sbar.c +++ b/engine/client/sbar.c @@ -1241,6 +1241,7 @@ Sbar_SoloScoreboard */ void Sbar_SoloScoreboard (void) { + int l; float time; char str[80]; int minutes, seconds, tens, units; diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index c2c23881c..9c1bbbbee 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -5116,23 +5116,22 @@ PF_changelevel void PF_changelevel (progfuncs_t *prinst, struct globalvars_s *pr_globals) { char *s, *spot; - static int last_spawncount; -// make sure we don't issue two changelevels - if (svs.spawncount == last_spawncount) +// make sure we don't issue two changelevels (unless the last one failed) + if (sv.mapchangelocked) return; - last_spawncount = svs.spawncount; + sv.mapchangelocked = true; if (*svprogfuncs->callargc == 2) { s = PR_GetStringOfs(prinst, OFS_PARM0); spot = PR_GetStringOfs(prinst, OFS_PARM1); - Cbuf_AddText (va("changelevel %s %s\n",s, spot), RESTRICT_LOCAL); + Cbuf_AddText (va("\nchangelevel %s %s\n",s, spot), RESTRICT_LOCAL); } else { s = PR_GetStringOfs(prinst, OFS_PARM0); - Cbuf_AddText (va("map %s\n",s), RESTRICT_LOCAL); + Cbuf_AddText (va("\nmap %s\n",s), RESTRICT_LOCAL); } } diff --git a/engine/server/server.h b/engine/server/server.h index c6edcaf56..5d66675ee 100644 --- a/engine/server/server.h +++ b/engine/server/server.h @@ -104,6 +104,7 @@ typedef struct float gamespeed; //time progression multiplier, fixed per-level. qboolean csqcdebug; + qboolean mapchangelocked; double time; double starttime; diff --git a/engine/server/sv_ccmds.c b/engine/server/sv_ccmds.c index 8e12ffa6c..5f088abc0 100644 --- a/engine/server/sv_ccmds.c +++ b/engine/server/sv_ccmds.c @@ -465,6 +465,8 @@ void SV_Map_f (void) return; } + sv.mapchangelocked = false; + Q_strncpyz (level, Cmd_Argv(1), sizeof(level)); startspot = ((Cmd_Argc() == 2)?NULL:Cmd_Argv(2)); @@ -583,9 +585,9 @@ void SV_Map_f (void) gametype = Cvar_Get("g_gametype", "0", CVAR_LATCH|CVAR_SERVERINFO, "Q3 compatability"); gametype->callback = gtcallback; if (wasspmap) - Cvar_ForceSet(gametype, "2"); - else if (gametype->value == 2) //singleplayer - Cvar_ForceSet(gametype, "0"); + Cvar_ForceSet(gametype, "2");//singleplayer + else if (gametype->value == 2) + Cvar_ForceSet(gametype, "0");//force to ffa deathmatch } #endif