summaryrefslogtreecommitdiff
path: root/src/game/g_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r--src/game/g_main.c40
1 files changed, 3 insertions, 37 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 5d10285f..15b19df9 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -628,47 +628,13 @@ int QDECL SortRanks( const void *a, const void *b )
ca = &level.clients[ *(int *)a ];
cb = &level.clients[ *(int *)b ];
- // sort special clients last
- if( ca->sess.spectatorState == SPECTATOR_SCOREBOARD || ca->sess.spectatorClient < 0 )
- return 1;
-
- if( cb->sess.spectatorState == SPECTATOR_SCOREBOARD || cb->sess.spectatorClient < 0 )
- return -1;
-
- // then connecting clients
- if( ca->pers.connected == CON_CONNECTING )
- return 1;
-
- if( cb->pers.connected == CON_CONNECTING )
- return -1;
-
-
- // then spectators
- if( ca->sess.sessionTeam == TEAM_SPECTATOR && cb->sess.sessionTeam == TEAM_SPECTATOR )
- {
- if( ca->sess.spectatorTime < cb->sess.spectatorTime )
- return -1;
-
- if( ca->sess.spectatorTime > cb->sess.spectatorTime )
- return 1;
-
- return 0;
- }
-
- if( ca->sess.sessionTeam == TEAM_SPECTATOR )
- return 1;
-
- if( cb->sess.sessionTeam == TEAM_SPECTATOR )
- return -1;
-
// then sort by score
if( ca->ps.persistant[ PERS_SCORE ] > cb->ps.persistant[ PERS_SCORE ] )
return -1;
-
- if( ca->ps.persistant[ PERS_SCORE ] < cb->ps.persistant[ PERS_SCORE ] )
+ else if( ca->ps.persistant[ PERS_SCORE ] < cb->ps.persistant[ PERS_SCORE ] )
return 1;
-
- return 0;
+ else
+ return 0;
}
/*