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
This commit is contained in:
Spoike 2007-03-04 19:17:16 +00:00
parent 6210ed87be
commit d804efe0cb
4 changed files with 12 additions and 9 deletions

View file

@ -1241,6 +1241,7 @@ Sbar_SoloScoreboard
*/ */
void Sbar_SoloScoreboard (void) void Sbar_SoloScoreboard (void)
{ {
int l;
float time; float time;
char str[80]; char str[80];
int minutes, seconds, tens, units; int minutes, seconds, tens, units;

View file

@ -5116,23 +5116,22 @@ PF_changelevel
void PF_changelevel (progfuncs_t *prinst, struct globalvars_s *pr_globals) void PF_changelevel (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{ {
char *s, *spot; char *s, *spot;
static int last_spawncount;
// make sure we don't issue two changelevels // make sure we don't issue two changelevels (unless the last one failed)
if (svs.spawncount == last_spawncount) if (sv.mapchangelocked)
return; return;
last_spawncount = svs.spawncount; sv.mapchangelocked = true;
if (*svprogfuncs->callargc == 2) if (*svprogfuncs->callargc == 2)
{ {
s = PR_GetStringOfs(prinst, OFS_PARM0); s = PR_GetStringOfs(prinst, OFS_PARM0);
spot = PR_GetStringOfs(prinst, OFS_PARM1); 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 else
{ {
s = PR_GetStringOfs(prinst, OFS_PARM0); s = PR_GetStringOfs(prinst, OFS_PARM0);
Cbuf_AddText (va("map %s\n",s), RESTRICT_LOCAL); Cbuf_AddText (va("\nmap %s\n",s), RESTRICT_LOCAL);
} }
} }

View file

@ -104,6 +104,7 @@ typedef struct
float gamespeed; //time progression multiplier, fixed per-level. float gamespeed; //time progression multiplier, fixed per-level.
qboolean csqcdebug; qboolean csqcdebug;
qboolean mapchangelocked;
double time; double time;
double starttime; double starttime;

View file

@ -465,6 +465,8 @@ void SV_Map_f (void)
return; return;
} }
sv.mapchangelocked = false;
Q_strncpyz (level, Cmd_Argv(1), sizeof(level)); Q_strncpyz (level, Cmd_Argv(1), sizeof(level));
startspot = ((Cmd_Argc() == 2)?NULL:Cmd_Argv(2)); 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 = Cvar_Get("g_gametype", "0", CVAR_LATCH|CVAR_SERVERINFO, "Q3 compatability");
gametype->callback = gtcallback; gametype->callback = gtcallback;
if (wasspmap) if (wasspmap)
Cvar_ForceSet(gametype, "2"); Cvar_ForceSet(gametype, "2");//singleplayer
else if (gametype->value == 2) //singleplayer else if (gametype->value == 2)
Cvar_ForceSet(gametype, "0"); Cvar_ForceSet(gametype, "0");//force to ffa deathmatch
} }
#endif #endif