diff --git a/reaction/cgame/cg_scoreboard.c b/reaction/cgame/cg_scoreboard.c index 5e7d2c5c..0232689e 100644 --- a/reaction/cgame/cg_scoreboard.c +++ b/reaction/cgame/cg_scoreboard.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.25 2002/05/07 13:35:45 jbravo +// Fixed the double lights for spectators and made the use cmd use rq3_cmd +// and made scoreboard not revieal whos alive or dead to live players. +// // Revision 1.24 2002/04/29 06:15:30 niceass // ref shown as green. more mm stuff soon to come // @@ -177,10 +181,10 @@ static void CG_DrawTeamplayClientScore( int y, score_t *score, float *Fill, floa if (FillColor[3] > 1) FillColor[3] = 1; // Dead? - if ( !score->alive ) { - TextColor[0] *= 0.6f; - TextColor[1] *= 0.6f; - TextColor[2] *= 0.6f; + if (!score->alive && cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR) { + TextColor[0] *= 0.5f; + TextColor[1] *= 0.5f; + TextColor[2] *= 0.5f; } DrawStrip(y, SB_FONTSIZEH, qtrue, qfalse, qfalse, FillColor, Boarder); diff --git a/reaction/game/g_teamplay.c b/reaction/game/g_teamplay.c index d0795e26..09e801eb 100644 --- a/reaction/game/g_teamplay.c +++ b/reaction/game/g_teamplay.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.83 2002/05/07 13:35:45 jbravo +// Fixed the double lights for spectators and made the use cmd use rq3_cmd +// and made scoreboard not revieal whos alive or dead to live players. +// // Revision 1.82 2002/05/06 21:41:01 slicer // Added rq3_cmd // @@ -297,8 +301,7 @@ void CheckTeamRules() level.lights_delay--; if (level.lights_delay == 1) { level.lights_delay = 0; - //trap_SendServerCommand(-1, "lights"); - trap_SendServerCommand(-1, va("rq3_cmd %i" ,LIGHTS)); + trap_SendServerCommand(-1, va("rq3_cmd %i", LIGHTS)); } } @@ -318,13 +321,6 @@ void CheckTeamRules() checked_tie = 1; } - if (level.lights_delay == 1) { - level.lights_delay = 0; - //Slicer - //trap_SendServerCommand(-1, "lights"); - trap_SendServerCommand(-1, va("rq3_cmd %i" ,LIGHTS)); - } - if (level.team_round_countdown == 1) { level.team_round_countdown = 0; if (BothTeamsHavePlayers()) { @@ -370,7 +366,7 @@ void CheckTeamRules() if (level.matchTime >= g_timelimit.integer * 60) { level.inGame = level.team_round_going = level.team_round_countdown = level.team_game_going = level.matchTime = 0; - trap_SendServerCommand( -1, va("rq3_cmd %i 0",ROUND)); + trap_SendServerCommand( -1, va("rq3_cmd %i 0", ROUND)); trap_Cvar_Set("g_RQ3_team1ready", "0"); trap_Cvar_Set("g_RQ3_team2ready", "0"); MakeAllLivePlayersObservers (); @@ -384,7 +380,7 @@ void CheckTeamRules() trap_SendServerCommand( -1, "print \"Timelimit hit.\n\"" ); //trap_SendServerCommand( -1, va("cp \"Timelimit hit.\n\"")); level.team_round_going = level.team_round_countdown = level.team_game_going = 0; - trap_SendServerCommand( -1, va("rq3_cmd %i 0",ROUND)); + trap_SendServerCommand( -1, va("rq3_cmd %i 0", ROUND)); //Slicer: Start Intermission BeginIntermission(); return; @@ -408,7 +404,7 @@ void CheckTeamRules() if (WonGame(winner)) return; level.team_round_going = 0; - trap_SendServerCommand( -1, va("rq3_cmd %i 0",ROUND)); + trap_SendServerCommand( -1, va("rq3_cmd %i 0", ROUND)); level.lights_camera_action = 0; level.holding_on_tie_check = 0; level.team_round_countdown = (71*level.fps)/10; @@ -421,7 +417,7 @@ void CheckTeamRules() if (WonGame(winner)) return; level.team_round_going = 0; - trap_SendServerCommand( -1, va("rq3_cmd %i 0",ROUND)); + trap_SendServerCommand( -1, va("rq3_cmd %i 0", ROUND)); level.lights_camera_action = 0; level.holding_on_tie_check = 0; level.team_round_countdown = (71*level.fps)/10; @@ -444,14 +440,14 @@ void ContinueLCA() { if (level.lights_camera_action == (21*level.fps)/10) { G_LogPrintf ("CAMERA...\n"); - trap_SendServerCommand(-1, va("rq3_cmd %i" ,CAMERA)); + trap_SendServerCommand(-1, va("rq3_cmd %i", CAMERA)); } else if (level.lights_camera_action == 1) { G_LogPrintf ("ACTION!\n"); - trap_SendServerCommand(-1, va("rq3_cmd %i" ,ACTION)); + trap_SendServerCommand(-1, va("rq3_cmd %i", ACTION)); trap_Cvar_Set("g_RQ3_lca", "0"); level.team_round_going = 1; - trap_SendServerCommand(-1, va("rq3_cmd %i 1" ,ROUND)); + trap_SendServerCommand(-1, va("rq3_cmd %i 1", ROUND)); level.current_round_length = 0; } level.lights_camera_action--; @@ -630,7 +626,7 @@ int WonGame(int winner) if (level.matchTime >= g_timelimit.integer * 60) { level.inGame = level.team_round_going = level.team_round_countdown = level.team_game_going = level.matchTime = 0; - trap_SendServerCommand( -1, va("rq3_cmd %i 0",ROUND)); + trap_SendServerCommand( -1, va("rq3_cmd %i 0", ROUND)); trap_Cvar_Set("g_RQ3_team1ready", "0"); trap_Cvar_Set("g_RQ3_team2ready", "0"); MakeAllLivePlayersObservers (); @@ -642,7 +638,7 @@ int WonGame(int winner) if (level.time - level.startTime >= g_timelimit.integer*60000) { trap_SendServerCommand( -1, "print \"Timelimit hit.\n\"" ); level.team_round_going = level.team_round_countdown = level.team_game_going = 0; - trap_SendServerCommand( -1, va("rq3_cmd %i 0",ROUND)); + trap_SendServerCommand( -1, va("rq3_cmd %i 0", ROUND)); //Slicer: Start Intermission BeginIntermission(); return 1; @@ -656,7 +652,7 @@ int WonGame(int winner) if (g_RQ3_matchmode.integer) { level.inGame = level.team_round_going = level.team_round_countdown = level.team_game_going = level.matchTime = 0; - trap_SendServerCommand( -1, va("rq3_cmd %i 0",ROUND)); + trap_SendServerCommand( -1, va("rq3_cmd %i 0", ROUND)); trap_Cvar_Set("g_RQ3_team1ready", "0"); trap_Cvar_Set("g_RQ3_team2ready", "0"); MakeAllLivePlayersObservers (); @@ -667,7 +663,7 @@ int WonGame(int winner) trap_SendServerCommand( -1, "print \"Roundlimit hit.\n\"" ); trap_SendServerCommand( -1, va("cp \"Roundlimit hit.\n\"")); level.team_round_going = level.team_round_countdown = level.team_game_going = 0; - trap_SendServerCommand( -1, va("rq3_cmd %i 0",ROUND)); + trap_SendServerCommand( -1, va("rq3_cmd %i 0", ROUND)); //Slicer: Start Intermission BeginIntermission(); return 1; @@ -755,7 +751,6 @@ void SpawnPlayers() // JBravo: lets not respawn spectators in free floating mode if (player->client->sess.savedTeam == TEAM_SPECTATOR && player->client->specMode == SPECTATOR_FREE) { - trap_SendServerCommand(player-g_entities, va("rq3_cmd %i" ,LIGHTS)); continue; } @@ -978,7 +973,7 @@ void EquipPlayer (gentity_t *ent) ANIM_TOGGLEBIT) | WP_ANIM_ACTIVATE; } if (!(ent->r.svFlags & SVF_BOT)) { - trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i %i",SETWEAPON,ent->client->ps.weapon)); + trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i %i", SETWEAPON, ent->client->ps.weapon)); } ent->client->ps.weaponstate = WEAPON_RAISING; @@ -1076,11 +1071,11 @@ void RQ3_Cmd_Radio_power_f(gentity_t *ent) if (ent->client->radioOff == qfalse) { ent->client->radioOff = qtrue; trap_SendServerCommand(ent-g_entities, "cp \"Radio switched off\n\""); - trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i 25 0",RADIO)); + trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i 25 0", RADIO)); } else { ent->client->radioOff = qfalse; trap_SendServerCommand(ent-g_entities, "cp \"Radio switched on\n\""); - trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i 25 0",RADIO)); + trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i 25 0", RADIO)); } } @@ -1205,7 +1200,7 @@ void RQ3_Cmd_Radio_f(gentity_t *ent) if (!player->inuse) continue; if (player->client->sess.savedTeam == ent->client->sess.savedTeam) - trap_SendServerCommand(player-g_entities, va("rq3_cmd %i %i %i\n",RADIO, + trap_SendServerCommand(player-g_entities, va("rq3_cmd %i %i %i\n", RADIO, kills-1, ent->client->radioGender)); } } @@ -1219,7 +1214,7 @@ void RQ3_Cmd_Radio_f(gentity_t *ent) trap_SendServerCommand(player-g_entities, va("print \"radio %s %s\n\"", ent->client->pers.netname, radio_msgs[x].msg)); else - trap_SendServerCommand(player-g_entities, va("rq3_cmd %i %i %i\n",RADIO, x, + trap_SendServerCommand(player-g_entities, va("rq3_cmd %i %i %i\n", RADIO, x, ent->client->radioGender)); } } @@ -1587,7 +1582,7 @@ void RQ3_SpectatorMode(gentity_t *ent) void RQ3_Cmd_Use_f(gentity_t *ent) { - char *cmd, buf[128]; + char *cmd; int weapon, i; if (!ent->client) { @@ -1689,8 +1684,7 @@ void RQ3_Cmd_Use_f(gentity_t *ent) } if (weapon == ent->client->ps.weapon) return; - Com_sprintf (buf, sizeof(buf), "stuff weapon %d\n", weapon); - trap_SendServerCommand(ent-g_entities, buf); + trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i weapon %i\n", STUFF, weapon)); } void Add_TeamWound(gentity_t *attacker, gentity_t *victim, int mod) @@ -1816,5 +1810,5 @@ void RQ3_Cmd_Stuff (void) client = atoi (user); cmd = ConcatArgs(2); - trap_SendServerCommand(client, va("rq3_cmd %i %s\n",STUFF, cmd)); + trap_SendServerCommand(client, va("rq3_cmd %i %s\n", STUFF, cmd)); }