mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
Adding variable team names. g_RQ3_team1name and g_RQ3_team2name. Fixed
Slicers fraglimit check.
This commit is contained in:
parent
5b46b3ee70
commit
46d280b49c
7 changed files with 58 additions and 19 deletions
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.26 2002/03/17 00:40:23 jbravo
|
||||
// Adding variable team names. g_RQ3_team1name and g_RQ3_team2name. Fixed
|
||||
// Slicers fraglimit check.
|
||||
//
|
||||
// Revision 1.25 2002/03/04 20:50:59 jbravo
|
||||
// No floating scores over dead bodies, triangles disabled, and no viewing
|
||||
// names of enemys just of teammates.
|
||||
|
@ -2492,7 +2496,7 @@ static qboolean CG_DrawFollow( void ) {
|
|||
vec4_t color;
|
||||
const char *name;
|
||||
int team;
|
||||
char combinedName[512];
|
||||
char combinedName[512], teamname[128];
|
||||
|
||||
if ( !(cg.snap->ps.pm_flags & PMF_FOLLOW) ) {
|
||||
return qfalse;
|
||||
|
@ -2508,11 +2512,13 @@ static qboolean CG_DrawFollow( void ) {
|
|||
if ( cgs.gametype >= GT_TEAM ) {
|
||||
team = cgs.clientinfo[ cg.snap->ps.clientNum ].team;
|
||||
if (team == TEAM_RED) {
|
||||
Com_sprintf (combinedName, sizeof(combinedName), "%s/Team 1",
|
||||
cgs.clientinfo[cg.snap->ps.clientNum].name);
|
||||
trap_Cvar_VariableStringBuffer("g_RQ3_team1name", teamname, sizeof(teamname));
|
||||
Com_sprintf (combinedName, sizeof(combinedName), "%s/%s",
|
||||
cgs.clientinfo[cg.snap->ps.clientNum].name, teamname);
|
||||
} else {
|
||||
Com_sprintf (combinedName, sizeof(combinedName), "%s/Team 2",
|
||||
cgs.clientinfo[cg.snap->ps.clientNum].name);
|
||||
trap_Cvar_VariableStringBuffer("g_RQ3_team2name", teamname, sizeof(teamname));
|
||||
Com_sprintf (combinedName, sizeof(combinedName), "%s/%s",
|
||||
cgs.clientinfo[cg.snap->ps.clientNum].name, teamname);
|
||||
}
|
||||
x = 0.5 * ( 640 - GIANT_WIDTH -16 * CG_DrawStrlen( combinedName ) );
|
||||
CG_DrawStringExt( x, 40, combinedName, color, qtrue, qtrue, GIANT_WIDTH - 16, GIANT_HEIGHT - 16, 0 );
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.41 2002/03/17 00:40:23 jbravo
|
||||
// Adding variable team names. g_RQ3_team1name and g_RQ3_team2name. Fixed
|
||||
// Slicers fraglimit check.
|
||||
//
|
||||
// Revision 1.40 2002/03/14 23:54:12 jbravo
|
||||
// Added a variable system from AQ. Works the same except it uses $ for %
|
||||
//
|
||||
|
@ -462,7 +466,7 @@ static void CG_Obituary( entityState_t *ent ) {
|
|||
}
|
||||
|
||||
// we don't know what it was
|
||||
CG_Printf( "%s died.\n", targetName );
|
||||
CG_Printf( "(CG_Obituary)%s died and the mod is %i. Tell this to JB\n", targetName, mod );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -675,7 +679,7 @@ static void CG_Obituary_Head( entityState_t *ent ) {
|
|||
}
|
||||
|
||||
// we don't know what it was
|
||||
CG_Printf( "%s died and the mod is %i. Tell this to JB\n", targetName, mod );
|
||||
CG_Printf( "(CG_Obituary_Head)%s died and the mod is %i. Tell this to JB\n", targetName, mod );
|
||||
}
|
||||
|
||||
|
||||
|
@ -859,7 +863,7 @@ static void CG_Obituary_Chest( entityState_t *ent ) {
|
|||
}
|
||||
|
||||
// we don't know what it was
|
||||
CG_Printf( "%s died.\n", targetName );
|
||||
CG_Printf( "(CG_Obituary_Chest)%s died and the mod is %i. Tell this to JB\n", targetName, mod );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1052,7 +1056,7 @@ static void CG_Obituary_Stomach( entityState_t *ent ) {
|
|||
}
|
||||
|
||||
// we don't know what it was
|
||||
CG_Printf( "%s died.\n", targetName );
|
||||
CG_Printf( "(CG_Obituary_Stomach)%s died and the mod is %i. Tell this to JB\n", targetName, mod );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1245,7 +1249,7 @@ static void CG_Obituary_Legs( entityState_t *ent ) {
|
|||
}
|
||||
|
||||
// we don't know what it was
|
||||
CG_Printf( "%s died.\n", targetName );
|
||||
CG_Printf( "(CG_Obituary_Legs)%s died and the mod is %i. Tell this to JB\n", targetName, mod );
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.13 2002/03/17 00:40:23 jbravo
|
||||
// Adding variable team names. g_RQ3_team1name and g_RQ3_team2name. Fixed
|
||||
// Slicers fraglimit check.
|
||||
//
|
||||
// Revision 1.12 2002/03/10 23:27:26 blaze
|
||||
// fixed net for the wstats
|
||||
//
|
||||
|
@ -310,6 +314,7 @@ static int CG_TeamplayScoreboard(int maxClients)
|
|||
int y;
|
||||
int size, players;
|
||||
char *String;
|
||||
char teamname[128];
|
||||
|
||||
if (cg.time > cg.scoreStartTime+300) {
|
||||
Alpha = (cos((cg.time-cg.scoreStartTime) / 400.0f) + 1.0f) * 0.25f + 0.5f;
|
||||
|
@ -350,8 +355,9 @@ static int CG_TeamplayScoreboard(int maxClients)
|
|||
|
||||
|
||||
MAKERGBA(color, 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
trap_Cvar_VariableStringBuffer("g_RQ3_team1name", teamname, sizeof(teamname));
|
||||
CG_DrawSmallStringColor(SB_MIDDLE-SB_WIDTH+SB_PADDING-6, SB_START_HEIGHT+SB_PADDING,
|
||||
"Team 1", color);
|
||||
teamname, color);
|
||||
|
||||
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 0.8f);
|
||||
CG_DrawSmallStringColor(SB_MIDDLE-SB_WIDTH+SB_PADDING-6, SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*3),
|
||||
|
@ -384,8 +390,9 @@ static int CG_TeamplayScoreboard(int maxClients)
|
|||
SB_WIDTH, (SMALLCHAR_HEIGHT+SB_PADDING*2), SB_LINE_WIDTH, color );
|
||||
|
||||
MAKERGBA(color, 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
trap_Cvar_VariableStringBuffer("g_RQ3_team2name", teamname, sizeof(teamname));
|
||||
CG_DrawSmallStringColor(SB_MIDDLE+SB_PADDING+6, SB_START_HEIGHT+SB_PADDING,
|
||||
"Team 2", color);
|
||||
teamname, color);
|
||||
|
||||
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 0.8f);
|
||||
CG_DrawSmallStringColor(SB_MIDDLE+SB_PADDING+6, SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*3),
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.72 2002/03/17 00:40:23 jbravo
|
||||
// Adding variable team names. g_RQ3_team1name and g_RQ3_team2name. Fixed
|
||||
// Slicers fraglimit check.
|
||||
//
|
||||
// Revision 1.71 2002/03/14 23:54:12 jbravo
|
||||
// Added a variable system from AQ. Works the same except it uses $ for %
|
||||
//
|
||||
|
@ -666,11 +670,11 @@ void BroadcastTeamChange( gclient_t *client, int oldTeam )
|
|||
|
||||
if (g_gametype.integer == GT_TEAMPLAY) {
|
||||
if (client->sess.savedTeam == TEAM_RED) {
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " joined team 1.\n\"",
|
||||
client->pers.netname));
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " joined %s.\n\"",
|
||||
client->pers.netname, g_RQ3_team1name.string));
|
||||
} else if (client->sess.savedTeam == TEAM_BLUE) {
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " joined team 2.\n\"",
|
||||
client->pers.netname));
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " joined %s.\n\"",
|
||||
client->pers.netname, g_RQ3_team2name.string));
|
||||
} else if (client->sess.savedTeam == TEAM_SPECTATOR && oldTeam != TEAM_SPECTATOR) {
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " left his team.\n\"",
|
||||
client->pers.netname));
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.53 2002/03/17 00:40:23 jbravo
|
||||
// Adding variable team names. g_RQ3_team1name and g_RQ3_team2name. Fixed
|
||||
// Slicers fraglimit check.
|
||||
//
|
||||
// Revision 1.52 2002/03/14 23:54:12 jbravo
|
||||
// Added a variable system from AQ. Works the same except it uses $ for %
|
||||
//
|
||||
|
@ -1109,6 +1113,8 @@ extern vmCvar_t g_RQ3_roundtimelimit; // JBravo: Time pr. round
|
|||
extern vmCvar_t g_RQ3_tgren; // JBravo: no. of team grenades
|
||||
extern vmCvar_t g_RQ3_limchasecam; // JBravo: 0 = no chasecam limit, 1 = limited to same team.
|
||||
extern vmCvar_t g_RQ3_sniperup; // JBravo: 0 = snipers begin with pistol, 1 = begin with sniper
|
||||
extern vmCvar_t g_RQ3_team1name; // JBravo: cvar for the name of team 1
|
||||
extern vmCvar_t g_RQ3_team2name; // JBravo: cvar for the name of team 2
|
||||
extern vmCvar_t RQ3_lca; // JBravo: cvar to signal cgame that LCA is in progress
|
||||
//Slicer: Team Status Cvars for MM
|
||||
extern vmCvar_t RQ3_team1;
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.31 2002/03/17 00:40:23 jbravo
|
||||
// Adding variable team names. g_RQ3_team1name and g_RQ3_team2name. Fixed
|
||||
// Slicers fraglimit check.
|
||||
//
|
||||
// Revision 1.30 2002/03/14 23:14:19 slicer
|
||||
// Added Fraglimit checks on TP ( !!! )
|
||||
//
|
||||
|
@ -147,6 +151,8 @@ vmCvar_t g_RQ3_roundtimelimit;
|
|||
vmCvar_t g_RQ3_tgren;
|
||||
vmCvar_t g_RQ3_limchasecam;
|
||||
vmCvar_t g_RQ3_sniperup;
|
||||
vmCvar_t g_RQ3_team1name;
|
||||
vmCvar_t g_RQ3_team2name;
|
||||
vmCvar_t RQ3_lca;
|
||||
//Slicer: Team Status Cvars for MM
|
||||
vmCvar_t RQ3_team1;
|
||||
|
@ -278,6 +284,8 @@ static cvarTable_t gameCvarTable[] = {
|
|||
{ &g_RQ3_tgren, "g_RQ3_tgren", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{ &g_RQ3_limchasecam, "g_RQ3_limchasecam", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{ &g_RQ3_sniperup, "g_RQ3_sniperup", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{ &g_RQ3_team1name, "g_RQ3_team1name", "Cops", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH, 0, qtrue, qtrue },
|
||||
{ &g_RQ3_team2name, "g_RQ3_team2name", "Robbers", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH, 0, qtrue, qtrue },
|
||||
{ &RQ3_lca, "RQ3_lca", "0", CVAR_SYSTEMINFO, 0, qfalse},
|
||||
//Slicer: Team Status Cvars for MM
|
||||
{ &RQ3_team1, "RQ3_team1", "0", CVAR_SYSTEMINFO, 0, qfalse},
|
||||
|
@ -1524,7 +1532,7 @@ void CheckExitRules( void ) {
|
|||
return;
|
||||
}
|
||||
//Slicer
|
||||
if(g_gametype.integer == GT_TEAMPLAY) {
|
||||
if(g_gametype.integer == GT_TEAMPLAY && g_fraglimit.integer > 0) {
|
||||
for ( i=0 ; i< g_maxclients.integer ; i++ ) {
|
||||
cl = level.clients + i;
|
||||
if ( cl->pers.connected != CON_CONNECTED ) {
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.34 2002/03/17 00:40:23 jbravo
|
||||
// Adding variable team names. g_RQ3_team1name and g_RQ3_team2name. Fixed
|
||||
// Slicers fraglimit check.
|
||||
//
|
||||
// Revision 1.33 2002/03/14 23:54:12 jbravo
|
||||
// Added a variable system from AQ. Works the same except it uses $ for %
|
||||
//
|
||||
|
@ -426,10 +430,10 @@ int WonGame(int winner)
|
|||
trap_SendServerCommand( -1, "print \"It was a tie, no points awarded!\n\"" );
|
||||
} else {
|
||||
if (winner == WINNER_TEAM1) {
|
||||
trap_SendServerCommand( -1, "print \"Team 1 won!\n\"" );
|
||||
trap_SendServerCommand( -1, va("print \"%s won!\n\"", g_RQ3_team1name.string));
|
||||
level.teamScores[TEAM_RED]++;
|
||||
} else {
|
||||
trap_SendServerCommand( -1, "print \"Team 2 won!\n\"" );
|
||||
trap_SendServerCommand( -1, va("print \"%s won!\n\"", g_RQ3_team2name.string));
|
||||
level.teamScores[TEAM_BLUE]++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue