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,18 +1261,14 @@ 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)
/* if (level.clients[i].sess.savedTeam == TEAM_RED)
level.numteamVotingClients[0]++;
else if (level.clients[i].sess.savedTeam == TEAM_BLUE)
level.numteamVotingClients[1]++;
level.numteamVotingClients[1]++; */
}
if (level.follow1 == -1) {
level.follow1 = i;
@ -1277,7 +1276,6 @@ void CalculateRanks(void)
level.follow2 = i;
}
}
}
} else {
if (level.clients[i].sess.sessionTeam != TEAM_SPECTATOR) {
level.numNonSpectatorClients++;