summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/mvd_game.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/mvd_game.c b/source/mvd_game.c
index 8486598..8b687c1 100644
--- a/source/mvd_game.c
+++ b/source/mvd_game.c
@@ -475,7 +475,7 @@ static void MVD_FollowPrev( udpClient_t *client ) {
static mvd_player_t *MVD_MostFollowed( mvd_t *mvd ) {
int count[MAX_CLIENTS];
udpClient_t *other;
- mvd_player_t *target = NULL;
+ mvd_player_t *player, *target = NULL;
int i, maxcount = -1;
memset( count, 0, sizeof( count ) );
@@ -485,10 +485,10 @@ static mvd_player_t *MVD_MostFollowed( mvd_t *mvd ) {
count[ other->target - mvd->players ]++;
}
}
- for( i = 0; i < mvd->maxclients; i++ ) {
- if( mvd->players[i].inuse && maxcount < count[i] ) {
+ for( i = 0, player = mvd->players; i < mvd->maxclients; i++, player++ ) {
+ if( player->inuse && player != mvd->dummy && maxcount < count[i] ) {
maxcount = count[i];
- target = &mvd->players[i];
+ target = player;
}
}
return target;