Honor setting to ignore bots when sorting servers by player count

master
Witold Piłat 2018-08-26 02:52:58 +02:00
parent c5e905eb64
commit e965447f55
1 changed files with 6 additions and 1 deletions

View File

@ -172,7 +172,12 @@ int compare_servers (const struct server *s1, const struct server *s2,
case SORT_SERVER_MAXPLAYERS:
res = s1->maxplayers - s2->maxplayers;
if (!res) {
res = s1->curplayers - s2->curplayers;
if (serverlist_countbots) {
res = s1->curplayers - s1->curbots - (s2->curplayers - s2->curbots);
}
else {
res = s1->curplayers - s2->curplayers;
}
}
break;