mirror of
https://github.com/UberGames/rpgxEF.git
synced 2024-11-10 07:11:34 +00:00
Manual merge of a fix that closes a loophole in the voting system.
This commit is contained in:
parent
60d731f0ac
commit
0185c5b409
1 changed files with 10 additions and 1 deletions
|
@ -979,6 +979,7 @@ static void Cmd_Team_f( gentity_t *ent ) {
|
|||
char send[100];
|
||||
gentity_t *other;
|
||||
clientSession_t *sess = &ent->client->sess;
|
||||
qboolean voted = qfalse;
|
||||
|
||||
//RPG-X: Redtechie - haha to stupid to change teams!
|
||||
if ( g_classData[sess->sessionClass].isn00b )
|
||||
|
@ -1024,8 +1025,16 @@ static void Cmd_Team_f( gentity_t *ent ) {
|
|||
sess->losses++;
|
||||
}
|
||||
|
||||
// check and save if this player has already voted
|
||||
voted = ent->client->ps.eFlags & EF_VOTED;
|
||||
|
||||
//if this is a manual change, not an assimilation, uninitialize the clInitStatus data
|
||||
SetTeam( ent, s );
|
||||
SetTeam(ent, s);
|
||||
|
||||
// restore previous vote state if a vote is running
|
||||
if (voted && level.voteTime) {
|
||||
ent->client->ps.eFlags |= EF_VOTED;
|
||||
}
|
||||
|
||||
ent->client->switchTeamTime = level.time + 2000;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue