Skip to content

Commit

Permalink
Fix update of player count in a room when inviting/following
Browse files Browse the repository at this point in the history
  • Loading branch information
Levak committed Apr 25, 2017
1 parent 1b5957b commit 8dbfc79
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/xmpp_wf/result/xmpp_iq_gameroom_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,19 +233,6 @@ void gameroom_sync(const char *data)
sync.mission.mode);
}
}

{ /* Display total new player count */
int new_count = sync.core.players->length;
int old_count = session.gameroom.sync.core.players->length;

if (new_count != old_count && new_count != 0)
{
xprintf("%s: %d/%d",
LANG(update_players),
new_count,
sync.custom_params.max_players);
}
}
}

if (ret & GR_SYNC_AUTO_START)
Expand Down Expand Up @@ -323,6 +310,19 @@ void gameroom_sync(const char *data)
NULL, NULL);
}
}

{ /* Display total new player count */
int new_count = sync.core.players->length;
int old_count = session.gameroom.sync.core.players->length;

if (new_count != old_count && new_count != 0)
{
xprintf("%s: %d/%d",
LANG(update_players),
new_count,
sync.custom_params.max_players);
}
}
}

gameroom_update(&session.gameroom.sync, &sync, ret);
Expand Down

0 comments on commit 8dbfc79

Please sign in to comment.