Base voting system is now fixed.

This commit is contained in:
Richard Allen 2002-06-17 03:22:58 +00:00
parent a12d8689f9
commit 5ac37b8722
2 changed files with 25 additions and 19 deletions

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.130 2002/06/17 03:22:58 jbravo
// Base voting system is now fixed.
//
// Revision 1.129 2002/06/16 20:06:14 jbravo
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
//
@ -1051,6 +1054,7 @@ void SetTeam(gentity_t * ent, char *s)
teamsave = client->sess.sessionTeam;
client->sess.sessionTeam = client->sess.savedTeam;
ClientUserinfoChanged(clientNum);
CalculateRanks();
client->sess.sessionTeam = teamsave;
//Slicer: Changing radio gender according to models
if (client->sess.savedTeam == TEAM_RED)
@ -1802,7 +1806,7 @@ void Cmd_CallVote_f(gentity_t * ent)
if (!Q_stricmp(arg1, "g_gametype")) {
i = atoi(arg2);
if (i != GT_FFA && i != GT_TEAMPLAY) {
trap_SendServerCommand(ent - g_entities, "print \"Invalid gametype.\n\"");
trap_SendServerCommand(ent - g_entities, "print \"Invalid gametype. Valid gametypes are 0 and 4.\n\"");
return;
}
@ -1906,6 +1910,10 @@ void Cmd_CallTeamVote_f(gentity_t * ent)
char arg1[MAX_STRING_TOKENS];
char arg2[MAX_STRING_TOKENS];
// JBravo: not wanted for TP
if (g_gametype.integer == GT_TEAMPLAY)
return;
team = ent->client->sess.sessionTeam;
if (team == TEAM_RED)
cs_offset = 0;

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.86 2002/06/17 03:22:58 jbravo
// Base voting system is now fixed.
//
// Revision 1.85 2002/06/16 20:11:18 niceass
// unused cvar removed
//
@ -1258,24 +1261,19 @@ void CalculateRanks(void)
level.numConnectedClients++;
if (g_gametype.integer == GT_TEAMPLAY) {
if (level.clients[i].sess.savedTeam != TEAM_SPECTATOR) {
level.numNonSpectatorClients++;
// decide if this should be auto-followed
if (level.clients[i].pers.connected == CON_CONNECTED) {
level.numPlayingClients++;
if (!(g_entities[i].r.svFlags & SVF_BOT)) {
level.numVotingClients++;
if (level.clients[i].sess.savedTeam == TEAM_RED)
level.numteamVotingClients[0]++;
else if (level.clients[i].sess.savedTeam == TEAM_BLUE)
level.numteamVotingClients[1]++;
}
if (level.follow1 == -1) {
level.follow1 = i;
} else if (level.follow2 == -1) {
level.follow2 = i;
}
if (level.clients[i].pers.connected == CON_CONNECTED) {
level.numPlayingClients++;
if (!(g_entities[i].r.svFlags & SVF_BOT)) {
level.numVotingClients++;
/* if (level.clients[i].sess.savedTeam == TEAM_RED)
level.numteamVotingClients[0]++;
else if (level.clients[i].sess.savedTeam == TEAM_BLUE)
level.numteamVotingClients[1]++; */
}
if (level.follow1 == -1) {
level.follow1 = i;
} else if (level.follow2 == -1) {
level.follow2 = i;
}
}
} else {