Hehehe


(h0nd) #1

// g_referee.c
// Pause/unpause a match.
void G_refPause_cmd(gentity_t *ent, qboolean fPause)
{
	char *status[2] = { "^5UN", "^1" };
	char *referee = (ent) ? "Referee" : "ref";

	if((PAUSE_UNPAUSING >= level.match_pause && !fPause) || (PAUSE_NONE != level.match_pause && fPause)) {
		G_refPrintf(ent, "The match is already %sPAUSED!
\"", status[fPause]);
		return;
	}

	if(ent && !G_cmdDebounce(ent, ((fPause)?"pause":"unpause"))) return;

	// Trigger the auto-handling of pauses
	if(fPause) {
		level.match_pause = 100 + ((ent) ? (1 + ent - g_entities) : 0);
		G_globalSound("sound/misc/referee.wav");
		G_spawnPrintf(DP_PAUSEINFO, level.time + 15000, NULL);
		AP(va("print \"^3%s ^1PAUSED^3 the match^3!
", referee));
		CP(va("cp \"^3Match is ^1PAUSED^3! (^7%s^3)
\"", referee));
		level.server_settings |= CV_SVS_PAUSE;
		trap_SetConfigstring(CS_SERVERTOGGLES, va("%d", level.server_settings));
	} else {
		AP(va("print \"
^3%s ^5UNPAUSES^3 the match ... resuming in 5 seconds!

\"", referee));
		level.match_pause = PAUSE_UNPAUSING;
		G_globalSound("sound/osp/prepare.wav");
		G_spawnPrintf(DP_UNPAUSING, level.time + 5, NULL);
		return;
	}
}

Pretty funny, the G_globalSound is still in here, so returns a warning, and it says RESUMING IN 5 SECONDS, but it takes 10 seconds before a match resumes :slight_smile:
Hehe, just to let you know, and fix the problem.