Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for

makro
This commit is contained in:
Richard Allen 2002-03-01 20:02:34 +00:00
parent 0fbc5770aa
commit 5cba60e438
6 changed files with 46 additions and 2 deletions

View file

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.62 2002/03/01 20:02:34 jbravo
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
// makro
//
// Revision 1.61 2002/02/28 05:42:31 blaze
// weapons stats on server side
//
@ -669,7 +673,7 @@ void SetTeam( gentity_t *ent, char *s )
int team, oldTeam, clientNum;
gclient_t *client;
spectatorState_t specState;
int specClient, teamLeader, teamsave;
int specClient, teamLeader, teamsave, x;
//
// see what change is requested
@ -846,6 +850,7 @@ void SetTeam( gentity_t *ent, char *s )
// JBravo: save sessionTeam and then set it correctly for the call to ClientUserinfoChanged
// so the scoreboard will be correct. Also check for uneven teams.
if (g_gametype.integer == GT_TEAMPLAY) {
x = RQ3TeamCount( -1, client->sess.savedTeam);
CheckForUnevenTeams(ent);
teamsave = client->sess.sessionTeam;
client->sess.sessionTeam = client->sess.savedTeam;

View file

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.24 2002/03/01 20:02:34 jbravo
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
// makro
//
// Revision 1.23 2002/03/01 18:21:26 jbravo
// Cleanups and removal of g_RQ3_sniperup
//
@ -441,6 +445,7 @@ team_t RQ3TeamCount( int ignoreClientNum, int team )
{
int i;
int count = 0;
char buf[20];
for ( i = 0 ; i < level.maxclients ; i++ ) {
if ( i == ignoreClientNum ) {
@ -457,6 +462,14 @@ team_t RQ3TeamCount( int ignoreClientNum, int team )
}
}
Com_sprintf (buf, sizeof(buf), "%i", count);
if (team == TEAM_RED)
trap_Cvar_Set("ui_RQ3_teamCount1", buf);
else if (team == TEAM_BLUE)
trap_Cvar_Set("ui_RQ3_teamCount2", buf);
else if (team == TEAM_SPECTATOR || team == TEAM_FREE)
trap_Cvar_Set("ui_RQ3_numSpectators", buf);
return count;
}

View file

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.4 2002/03/01 20:02:34 jbravo
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
// makro
//
// Revision 1.3 2002/02/21 20:10:16 jbravo
// Converted files back from M$ format and added cvs headers again.
//
@ -124,6 +128,10 @@ extern vmCvar_t ui_bigFont;
extern vmCvar_t ui_serverStatusTimeOut;
//Makro - cvar for player model display
extern vmCvar_t ui_RQ3_model_command;
// JBravo: teamcount cvars for Makro
extern vmCvar_t ui_RQ3_teamCount1;
extern vmCvar_t ui_RQ3_teamCount2;
extern vmCvar_t ui_RQ3_numSpectators;
//

View file

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.4 2002/03/01 20:02:34 jbravo
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
// makro
//
// Revision 1.3 2002/02/21 20:10:16 jbravo
// Converted files back from M$ format and added cvs headers again.
//
@ -5761,6 +5765,10 @@ vmCvar_t ui_realWarmUp;
vmCvar_t ui_serverStatusTimeOut;
//Makro - cvar for player model display
vmCvar_t ui_RQ3_model_command;
// JBravo: teamcount cvars for Makro
vmCvar_t ui_RQ3_teamCount1;
vmCvar_t ui_RQ3_teamCount2;
vmCvar_t ui_RQ3_numSpectators;
// bk001129 - made static to avoid aliasing
@ -5885,7 +5893,9 @@ static cvarTable_t cvarTable[] = {
{ &ui_serverStatusTimeOut, "ui_serverStatusTimeOut", "7000", CVAR_ARCHIVE},
//Makro - cvar for player model display
{ &ui_RQ3_model_command, "ui_RQ3_model_command", "0", CVAR_ARCHIVE},
{ &ui_RQ3_teamCount1, "ui_RQ3_teamCount1", "0", CVAR_ROM},
{ &ui_RQ3_teamCount2, "ui_RQ3_teamCount2", "0", CVAR_ROM},
{ &ui_RQ3_numSpectators, "ui_RQ3_numSpectators", "0", CVAR_ROM}
};
// bk001129 - made static to avoid aliasing

View file

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.6 2002/03/01 20:02:34 jbravo
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
// makro
//
// Revision 1.5 2002/02/24 00:54:12 makro
// Even more fixes to the shortcut keys code.
// Added more info to the header, too :)

View file

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.6 2002/03/01 20:02:34 jbravo
// Added ui_RQ3_teamCount1, ui_RQ3_teamCount2 and ui_RQ3_numSpectators for
// makro
//
// Revision 1.5 2002/02/24 00:54:12 makro
// Even more fixes to the shortcut keys code.
// Added more info to the header, too :)