mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-18 23:52:05 +00:00
More teamname cleanups and fix for fraglines.
This commit is contained in:
parent
d387015f51
commit
d22a255004
7 changed files with 47 additions and 28 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.29 2002/03/21 15:02:05 jbravo
|
||||
// More teamname cleanups and fix for fraglines.
|
||||
//
|
||||
// Revision 1.28 2002/03/17 21:32:23 jbravo
|
||||
// Fixed the dynamic teamnames system up a bit to reduce traffic
|
||||
//
|
||||
|
@ -2504,7 +2507,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;
|
||||
|
@ -2520,11 +2523,13 @@ static qboolean CG_DrawFollow( void ) {
|
|||
if ( cgs.gametype >= GT_TEAM ) {
|
||||
team = cgs.clientinfo[ cg.snap->ps.clientNum ].team;
|
||||
if (team == TEAM_RED) {
|
||||
trap_Cvar_VariableStringBuffer("g_RQ3_team1name", teamname, sizeof(teamname));
|
||||
Com_sprintf (combinedName, sizeof(combinedName), "%s/%s",
|
||||
cgs.clientinfo[cg.snap->ps.clientNum].name, cg_RQ3_team1name.string);
|
||||
cgs.clientinfo[cg.snap->ps.clientNum].name, teamname);
|
||||
} else {
|
||||
trap_Cvar_VariableStringBuffer("g_RQ3_team2name", teamname, sizeof(teamname));
|
||||
Com_sprintf (combinedName, sizeof(combinedName), "%s/%s",
|
||||
cgs.clientinfo[cg.snap->ps.clientNum].name, cg_RQ3_team2name.string);
|
||||
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,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.45 2002/03/21 15:02:05 jbravo
|
||||
// More teamname cleanups and fix for fraglines.
|
||||
//
|
||||
// Revision 1.44 2002/03/18 13:32:53 jbravo
|
||||
// Fixed the fraglines for sniper head kills and twekaed bandaging a bit for
|
||||
// testing
|
||||
|
@ -449,8 +452,8 @@ static void CG_Obituary( entityState_t *ent ) {
|
|||
|
||||
// JBravo: live players dont get fraglines.
|
||||
if (message) {
|
||||
if (target != attacker && (cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ||
|
||||
cg.snap->ps.clientNum == attacker))
|
||||
if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker ||
|
||||
cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR)
|
||||
CG_Printf( "%s %s %s%s\n",
|
||||
targetName, message, attackerName, message2);
|
||||
return;
|
||||
|
@ -659,8 +662,8 @@ static void CG_Obituary_Head( entityState_t *ent ) {
|
|||
|
||||
// JBravo: live players dont get fraglines.
|
||||
if (message) {
|
||||
if (target != attacker && (cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ||
|
||||
cg.snap->ps.clientNum == attacker))
|
||||
if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker ||
|
||||
cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR)
|
||||
CG_Printf( "%s %s %s%s\n",
|
||||
targetName, message, attackerName, message2);
|
||||
return;
|
||||
|
@ -842,8 +845,8 @@ static void CG_Obituary_Chest( entityState_t *ent ) {
|
|||
|
||||
// JBravo: live players dont get fraglines.
|
||||
if (message) {
|
||||
if (target != attacker && (cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ||
|
||||
cg.snap->ps.clientNum == attacker))
|
||||
if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker ||
|
||||
cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR)
|
||||
CG_Printf( "%s %s %s%s\n",
|
||||
targetName, message, attackerName, message2);
|
||||
return;
|
||||
|
@ -1034,8 +1037,8 @@ static void CG_Obituary_Stomach( entityState_t *ent ) {
|
|||
|
||||
// JBravo: live players dont get fraglines.
|
||||
if (message) {
|
||||
if (target != attacker && (cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ||
|
||||
cg.snap->ps.clientNum == attacker))
|
||||
if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker ||
|
||||
cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR)
|
||||
CG_Printf( "%s %s %s%s\n",
|
||||
targetName, message, attackerName, message2);
|
||||
return;
|
||||
|
@ -1230,8 +1233,8 @@ static void CG_Obituary_Legs( entityState_t *ent ) {
|
|||
|
||||
// JBravo: live players dont get fraglines.
|
||||
if (message) {
|
||||
if (target != attacker && (cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ||
|
||||
cg.snap->ps.clientNum == attacker))
|
||||
if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker ||
|
||||
cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR)
|
||||
CG_Printf( "%s %s %s%s\n",
|
||||
targetName, message, attackerName, message2);
|
||||
return;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.56 2002/03/21 15:02:05 jbravo
|
||||
// More teamname cleanups and fix for fraglines.
|
||||
//
|
||||
// Revision 1.55 2002/03/21 02:17:39 blaze
|
||||
// more func_explosive goodness
|
||||
//
|
||||
|
@ -1552,8 +1555,6 @@ extern vmCvar_t cg_enableBreath;
|
|||
extern cheat_cvar cheats[30];
|
||||
// JBravo: To signal cgame that lca is in progress
|
||||
extern vmCvar_t RQ3_lca;
|
||||
extern vmCvar_t cg_RQ3_team1name;
|
||||
extern vmCvar_t cg_RQ3_team2name;
|
||||
//Slicer: matchmode team status cvars
|
||||
extern vmCvar_t RQ3_team1;
|
||||
extern vmCvar_t RQ3_team2;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.48 2002/03/21 15:02:05 jbravo
|
||||
// More teamname cleanups and fix for fraglines.
|
||||
//
|
||||
// Revision 1.47 2002/03/21 00:26:20 blaze
|
||||
// some fixing of func_explosive
|
||||
//
|
||||
|
@ -268,8 +271,6 @@ vmCvar_t cg_enableDust;
|
|||
cheat_cvar cheats[30];
|
||||
// JBravo: lca in progress cvar
|
||||
vmCvar_t RQ3_lca;
|
||||
vmCvar_t cg_RQ3_team1name;
|
||||
vmCvar_t cg_RQ3_team2name;
|
||||
//Slicer: matchmode team status cvars
|
||||
vmCvar_t MM_team1;
|
||||
vmCvar_t MM_team2;
|
||||
|
@ -376,9 +377,6 @@ static cvarTable_t cvarTable[] = { // bk001129
|
|||
{ &cg_hudFiles, "cg_hudFiles", "ui/hud.txt", CVAR_ARCHIVE},
|
||||
{ &cg_enableDust, "g_enableDust", "0", CVAR_SERVERINFO},
|
||||
#endif
|
||||
// JBravo: dynamic teamnames.
|
||||
{ &cg_RQ3_team1name, "g_RQ3_team1name", "Swat", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO },
|
||||
{ &cg_RQ3_team2name, "g_RQ3_team2name", "Robbers", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO },
|
||||
// NiceAss: Taken out of the missionpack
|
||||
{ &cg_enableBreath, "g_enableBreath", "0", CVAR_SERVERINFO},
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.15 2002/03/21 15:02:05 jbravo
|
||||
// More teamname cleanups and fix for fraglines.
|
||||
//
|
||||
// Revision 1.14 2002/03/17 21:32:23 jbravo
|
||||
// Fixed the dynamic teamnames system up a bit to reduce traffic
|
||||
//
|
||||
|
@ -317,6 +320,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;
|
||||
|
@ -357,8 +361,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,
|
||||
cg_RQ3_team1name.string, 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),
|
||||
|
@ -391,8 +396,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,
|
||||
cg_RQ3_team2name.string, 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,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.34 2002/03/21 15:02:05 jbravo
|
||||
// More teamname cleanups and fix for fraglines.
|
||||
//
|
||||
// Revision 1.33 2002/03/17 20:53:44 slicer
|
||||
// Small fix on CheckExitRules
|
||||
//
|
||||
|
@ -291,8 +294,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 },
|
||||
{ &g_RQ3_team1name, "g_RQ3_team1name", "Robbers", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH, 0, qtrue, qtrue },
|
||||
{ &g_RQ3_team2name, "g_RQ3_team2name", "Swat", 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},
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.39 2002/03/21 15:02:05 jbravo
|
||||
// More teamname cleanups and fix for fraglines.
|
||||
//
|
||||
// Revision 1.38 2002/03/18 12:25:10 jbravo
|
||||
// Live players dont get fraglines, except their own. Cleanups and some
|
||||
// hacks to get bots to stop using knives only.
|
||||
|
@ -552,12 +555,12 @@ void CheckForUnevenTeams(gentity_t *player)
|
|||
|
||||
if (player->client->sess.savedTeam == TEAM_RED) {
|
||||
if (onteam1 > onteam2)
|
||||
trap_SendServerCommand(player-g_entities, va("print \"Your team now has %d more player%s than team 2\n\"",
|
||||
onteam1 - onteam2, onteam1 - onteam2 == 1 ? "" : "s"));
|
||||
trap_SendServerCommand(player-g_entities, va("print \"Your team now has %d more player%s than %s\n\"",
|
||||
onteam1 - onteam2, onteam1 - onteam2 == 1 ? "" : "s", g_RQ3_team2name.string));
|
||||
} else if (player->client->sess.savedTeam == TEAM_BLUE) {
|
||||
if (onteam2 > onteam1)
|
||||
trap_SendServerCommand(player-g_entities, va("print \"Your team now has %d more player%s than team 1\n\"",
|
||||
onteam2 - onteam1, onteam2 - onteam1 == 1 ? "" : "s"));
|
||||
trap_SendServerCommand(player-g_entities, va("print \"Your team now has %d more player%s than %s\n\"",
|
||||
onteam2 - onteam1, onteam2 - onteam1 == 1 ? "" : "s", g_RQ3_team1name.string));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue