mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
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.
This commit is contained in:
parent
975ba3eb12
commit
eebd48453e
2 changed files with 32 additions and 34 deletions
|
@ -5,6 +5,10 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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
|
// Revision 1.24 2002/04/29 06:15:30 niceass
|
||||||
// ref shown as green. more mm stuff soon to come
|
// 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;
|
if (FillColor[3] > 1) FillColor[3] = 1;
|
||||||
|
|
||||||
// Dead?
|
// Dead?
|
||||||
if ( !score->alive ) {
|
if (!score->alive && cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR) {
|
||||||
TextColor[0] *= 0.6f;
|
TextColor[0] *= 0.5f;
|
||||||
TextColor[1] *= 0.6f;
|
TextColor[1] *= 0.5f;
|
||||||
TextColor[2] *= 0.6f;
|
TextColor[2] *= 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qfalse, qfalse, FillColor, Boarder);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qfalse, qfalse, FillColor, Boarder);
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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
|
// Revision 1.82 2002/05/06 21:41:01 slicer
|
||||||
// Added rq3_cmd
|
// Added rq3_cmd
|
||||||
//
|
//
|
||||||
|
@ -297,8 +301,7 @@ void CheckTeamRules()
|
||||||
level.lights_delay--;
|
level.lights_delay--;
|
||||||
if (level.lights_delay == 1) {
|
if (level.lights_delay == 1) {
|
||||||
level.lights_delay = 0;
|
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;
|
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) {
|
if (level.team_round_countdown == 1) {
|
||||||
level.team_round_countdown = 0;
|
level.team_round_countdown = 0;
|
||||||
if (BothTeamsHavePlayers()) {
|
if (BothTeamsHavePlayers()) {
|
||||||
|
@ -370,7 +366,7 @@ void CheckTeamRules()
|
||||||
if (level.matchTime >= g_timelimit.integer * 60) {
|
if (level.matchTime >= g_timelimit.integer * 60) {
|
||||||
level.inGame = level.team_round_going = level.team_round_countdown =
|
level.inGame = level.team_round_going = level.team_round_countdown =
|
||||||
level.team_game_going = level.matchTime = 0;
|
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_team1ready", "0");
|
||||||
trap_Cvar_Set("g_RQ3_team2ready", "0");
|
trap_Cvar_Set("g_RQ3_team2ready", "0");
|
||||||
MakeAllLivePlayersObservers ();
|
MakeAllLivePlayersObservers ();
|
||||||
|
@ -384,7 +380,7 @@ void CheckTeamRules()
|
||||||
trap_SendServerCommand( -1, "print \"Timelimit hit.\n\"" );
|
trap_SendServerCommand( -1, "print \"Timelimit hit.\n\"" );
|
||||||
//trap_SendServerCommand( -1, va("cp \"Timelimit hit.\n\""));
|
//trap_SendServerCommand( -1, va("cp \"Timelimit hit.\n\""));
|
||||||
level.team_round_going = level.team_round_countdown = level.team_game_going = 0;
|
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
|
//Slicer: Start Intermission
|
||||||
BeginIntermission();
|
BeginIntermission();
|
||||||
return;
|
return;
|
||||||
|
@ -408,7 +404,7 @@ void CheckTeamRules()
|
||||||
if (WonGame(winner))
|
if (WonGame(winner))
|
||||||
return;
|
return;
|
||||||
level.team_round_going = 0;
|
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.lights_camera_action = 0;
|
||||||
level.holding_on_tie_check = 0;
|
level.holding_on_tie_check = 0;
|
||||||
level.team_round_countdown = (71*level.fps)/10;
|
level.team_round_countdown = (71*level.fps)/10;
|
||||||
|
@ -421,7 +417,7 @@ void CheckTeamRules()
|
||||||
if (WonGame(winner))
|
if (WonGame(winner))
|
||||||
return;
|
return;
|
||||||
level.team_round_going = 0;
|
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.lights_camera_action = 0;
|
||||||
level.holding_on_tie_check = 0;
|
level.holding_on_tie_check = 0;
|
||||||
level.team_round_countdown = (71*level.fps)/10;
|
level.team_round_countdown = (71*level.fps)/10;
|
||||||
|
@ -444,14 +440,14 @@ void ContinueLCA()
|
||||||
{
|
{
|
||||||
if (level.lights_camera_action == (21*level.fps)/10) {
|
if (level.lights_camera_action == (21*level.fps)/10) {
|
||||||
G_LogPrintf ("CAMERA...\n");
|
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) {
|
else if (level.lights_camera_action == 1) {
|
||||||
G_LogPrintf ("ACTION!\n");
|
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");
|
trap_Cvar_Set("g_RQ3_lca", "0");
|
||||||
level.team_round_going = 1;
|
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.current_round_length = 0;
|
||||||
}
|
}
|
||||||
level.lights_camera_action--;
|
level.lights_camera_action--;
|
||||||
|
@ -630,7 +626,7 @@ int WonGame(int winner)
|
||||||
if (level.matchTime >= g_timelimit.integer * 60) {
|
if (level.matchTime >= g_timelimit.integer * 60) {
|
||||||
level.inGame = level.team_round_going = level.team_round_countdown =
|
level.inGame = level.team_round_going = level.team_round_countdown =
|
||||||
level.team_game_going = level.matchTime = 0;
|
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_team1ready", "0");
|
||||||
trap_Cvar_Set("g_RQ3_team2ready", "0");
|
trap_Cvar_Set("g_RQ3_team2ready", "0");
|
||||||
MakeAllLivePlayersObservers ();
|
MakeAllLivePlayersObservers ();
|
||||||
|
@ -642,7 +638,7 @@ int WonGame(int winner)
|
||||||
if (level.time - level.startTime >= g_timelimit.integer*60000) {
|
if (level.time - level.startTime >= g_timelimit.integer*60000) {
|
||||||
trap_SendServerCommand( -1, "print \"Timelimit hit.\n\"" );
|
trap_SendServerCommand( -1, "print \"Timelimit hit.\n\"" );
|
||||||
level.team_round_going = level.team_round_countdown = level.team_game_going = 0;
|
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
|
//Slicer: Start Intermission
|
||||||
BeginIntermission();
|
BeginIntermission();
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -656,7 +652,7 @@ int WonGame(int winner)
|
||||||
if (g_RQ3_matchmode.integer) {
|
if (g_RQ3_matchmode.integer) {
|
||||||
level.inGame = level.team_round_going = level.team_round_countdown =
|
level.inGame = level.team_round_going = level.team_round_countdown =
|
||||||
level.team_game_going = level.matchTime = 0;
|
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_team1ready", "0");
|
||||||
trap_Cvar_Set("g_RQ3_team2ready", "0");
|
trap_Cvar_Set("g_RQ3_team2ready", "0");
|
||||||
MakeAllLivePlayersObservers ();
|
MakeAllLivePlayersObservers ();
|
||||||
|
@ -667,7 +663,7 @@ int WonGame(int winner)
|
||||||
trap_SendServerCommand( -1, "print \"Roundlimit hit.\n\"" );
|
trap_SendServerCommand( -1, "print \"Roundlimit hit.\n\"" );
|
||||||
trap_SendServerCommand( -1, va("cp \"Roundlimit hit.\n\""));
|
trap_SendServerCommand( -1, va("cp \"Roundlimit hit.\n\""));
|
||||||
level.team_round_going = level.team_round_countdown = level.team_game_going = 0;
|
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
|
//Slicer: Start Intermission
|
||||||
BeginIntermission();
|
BeginIntermission();
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -755,7 +751,6 @@ void SpawnPlayers()
|
||||||
// JBravo: lets not respawn spectators in free floating mode
|
// JBravo: lets not respawn spectators in free floating mode
|
||||||
if (player->client->sess.savedTeam == TEAM_SPECTATOR &&
|
if (player->client->sess.savedTeam == TEAM_SPECTATOR &&
|
||||||
player->client->specMode == SPECTATOR_FREE) {
|
player->client->specMode == SPECTATOR_FREE) {
|
||||||
trap_SendServerCommand(player-g_entities, va("rq3_cmd %i" ,LIGHTS));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -978,7 +973,7 @@ void EquipPlayer (gentity_t *ent)
|
||||||
ANIM_TOGGLEBIT) | WP_ANIM_ACTIVATE;
|
ANIM_TOGGLEBIT) | WP_ANIM_ACTIVATE;
|
||||||
}
|
}
|
||||||
if (!(ent->r.svFlags & SVF_BOT)) {
|
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;
|
ent->client->ps.weaponstate = WEAPON_RAISING;
|
||||||
|
|
||||||
|
@ -1076,11 +1071,11 @@ void RQ3_Cmd_Radio_power_f(gentity_t *ent)
|
||||||
if (ent->client->radioOff == qfalse) {
|
if (ent->client->radioOff == qfalse) {
|
||||||
ent->client->radioOff = qtrue;
|
ent->client->radioOff = qtrue;
|
||||||
trap_SendServerCommand(ent-g_entities, "cp \"Radio switched off\n\"");
|
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 {
|
} else {
|
||||||
ent->client->radioOff = qfalse;
|
ent->client->radioOff = qfalse;
|
||||||
trap_SendServerCommand(ent-g_entities, "cp \"Radio switched on\n\"");
|
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)
|
if (!player->inuse)
|
||||||
continue;
|
continue;
|
||||||
if (player->client->sess.savedTeam == ent->client->sess.savedTeam)
|
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));
|
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\"",
|
trap_SendServerCommand(player-g_entities, va("print \"radio %s %s\n\"",
|
||||||
ent->client->pers.netname, radio_msgs[x].msg));
|
ent->client->pers.netname, radio_msgs[x].msg));
|
||||||
else
|
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));
|
ent->client->radioGender));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1587,7 +1582,7 @@ void RQ3_SpectatorMode(gentity_t *ent)
|
||||||
|
|
||||||
void RQ3_Cmd_Use_f(gentity_t *ent)
|
void RQ3_Cmd_Use_f(gentity_t *ent)
|
||||||
{
|
{
|
||||||
char *cmd, buf[128];
|
char *cmd;
|
||||||
int weapon, i;
|
int weapon, i;
|
||||||
|
|
||||||
if (!ent->client) {
|
if (!ent->client) {
|
||||||
|
@ -1689,8 +1684,7 @@ void RQ3_Cmd_Use_f(gentity_t *ent)
|
||||||
}
|
}
|
||||||
if (weapon == ent->client->ps.weapon)
|
if (weapon == ent->client->ps.weapon)
|
||||||
return;
|
return;
|
||||||
Com_sprintf (buf, sizeof(buf), "stuff weapon %d\n", weapon);
|
trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i weapon %i\n", STUFF, weapon));
|
||||||
trap_SendServerCommand(ent-g_entities, buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Add_TeamWound(gentity_t *attacker, gentity_t *victim, int mod)
|
void Add_TeamWound(gentity_t *attacker, gentity_t *victim, int mod)
|
||||||
|
@ -1816,5 +1810,5 @@ void RQ3_Cmd_Stuff (void)
|
||||||
client = atoi (user);
|
client = atoi (user);
|
||||||
cmd = ConcatArgs(2);
|
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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue