From b13af2ca1735c259a3b843bb0b215d80086d7f3c Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Sun, 5 May 2002 01:20:50 +0000 Subject: [PATCH] Delay the lights sound 5 server frames. --- reaction/game/g_local.h | 4 ++++ reaction/game/g_teamplay.c | 20 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/reaction/game/g_local.h b/reaction/game/g_local.h index 128abfd5..d14fca8e 100644 --- a/reaction/game/g_local.h +++ b/reaction/game/g_local.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.74 2002/05/05 01:20:50 jbravo +// Delay the lights sound 5 server frames. +// // Revision 1.73 2002/04/30 11:20:12 jbravo // Redid the teamcount cvars. // @@ -669,6 +672,7 @@ typedef struct { vec3_t team2spawn_origin; vec3_t team2spawn_angles; int fps; + int lights_delay; } level_locals_t; // // rxn_game.c diff --git a/reaction/game/g_teamplay.c b/reaction/game/g_teamplay.c index cdd80558..41e414da 100644 --- a/reaction/game/g_teamplay.c +++ b/reaction/game/g_teamplay.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.77 2002/05/05 01:20:50 jbravo +// Delay the lights sound 5 server frames. +// // Revision 1.76 2002/05/04 16:19:02 jbravo // Fixing the stuff cmd to work on dedicated servers. // @@ -278,6 +281,14 @@ void CheckTeamRules() level.fps = trap_Cvar_VariableIntegerValue("sv_fps"); + if (level.lights_delay) { + level.lights_delay--; + if (level.lights_delay == 1) { + level.lights_delay = 0; + trap_SendServerCommand(-1, "lights"); + } + } + if (level.lights_camera_action) { ContinueLCA(); return; @@ -294,6 +305,11 @@ void CheckTeamRules() checked_tie = 1; } + if (level.lights_delay == 1) { + level.lights_delay = 0; + trap_SendServerCommand(-1, "lights"); + } + if (level.team_round_countdown == 1) { level.team_round_countdown = 0; if (BothTeamsHavePlayers()) { @@ -406,7 +422,7 @@ void StartLCA() level.lights_camera_action = (41*level.fps)/10; G_LogPrintf ("LIGHTS...\n"); SpawnPlayers(); -// trap_SendServerCommand( -1, "lights"); + level.lights_delay = 6; } void ContinueLCA() @@ -735,7 +751,7 @@ void SpawnPlayers() client->sess.spectatorState = SPECTATOR_NOT; } client->ps.stats[STAT_RQ3] &= ~RQ3_PLAYERSOLID; - trap_SendServerCommand(player-g_entities, "lights"); +// trap_SendServerCommand(player-g_entities, "lights"); ClientSpawn(player); ClientUserinfoChanged(clientNum); client->sess.teamSpawn = qfalse;