improved filter
This commit is contained in:
parent
5e41ddd86c
commit
a29c747149
@ -10,7 +10,7 @@
|
||||
#define MAXLEADERS 64
|
||||
#pragma newdecls required
|
||||
|
||||
int leaderMVP, leaderScore, currentSprite = -1, spriteEntities[MAXPLAYERS+1], markerEntities[MAXPLAYERS+1], leaderClient = -1;
|
||||
int currentSprite = -1, spriteEntities[MAXPLAYERS+1], markerEntities[MAXPLAYERS+1], leaderClient = -1;
|
||||
int voteCount[MAXPLAYERS+1], votedFor[MAXPLAYERS+1];
|
||||
|
||||
bool markerActive = false, beaconActive = false, allowVoting = false;
|
||||
@ -616,7 +616,7 @@ public bool Filter_Leaders(const char[] sPattern, Handle hClients)
|
||||
{
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(IsClientInGame(i) && !IsFakeClient(i) && IsPossibleLeader(i))
|
||||
if(IsClientInGame(i) && !IsFakeClient(i) && (IsPossibleLeader(i) || i == leaderClient))
|
||||
{
|
||||
PushArrayCell(hClients, i);
|
||||
}
|
||||
@ -631,7 +631,7 @@ public bool Filter_NotLeaders(const char[] sPattern, Handle hClients)
|
||||
{
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(IsClientInGame(i) && !IsFakeClient(i) && !IsPossibleLeader(i))
|
||||
if(IsClientInGame(i) && !IsFakeClient(i) && !IsPossibleLeader(i) && i != leaderClient)
|
||||
{
|
||||
PushArrayCell(hClients, i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user