- Code: Select all
public override bool AllowUserJoin(Player player) {
if (PlayerCount+1 > 2) {
player.Send(Message.Create("SearchRoomFull"));
return false;
}
return true;
}
I try this with one client (same user joining over and over at a click of a button).
When I click on this button very very fast, I sometimes get a room with 3 users, although this shouldn't happen...
Adding a:
- Code: Select all
Console.WriteLine("PlayerCount: " + PlayerCount);
reveals I get "PlayerCount: 0" multiple times.
Has anyone encountered this issue?
Thanks!