From: Jordi Albornoz Date: Tue, 3 Dec 2002 17:27:25 +0000 (+0000) Subject: patch from Niko Böhm, fixes player count after several /move commands. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=03ea0cb5c9ce5763ae6a0f1dfda2d66bc0aa5c76;p=gtetrinet patch from Niko Böhm, fixes player count after several /move commands. --- diff --git a/AUTHORS b/AUTHORS index a40c47f..a86b60c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,6 +13,7 @@ Neil Bird Pihvi Jordi Mallach Bastien Nocera +Niko Böhm James Antill Steve Kemp Gerfried Fuchs diff --git a/ChangeLog b/ChangeLog index 8abfecf..9369835 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-12-03 Jordi Mallach + + * src/tetrinet.c (tetrinet_inmessage): patch from Niko Böhm, fixes + player count after several /move commands. + + * AUTHORS: added Niko. + 2002-12-02 James Antill * src/misc.c (adjust_bottom_text_view): Change function API to work on diff --git a/src/tetrinet.c b/src/tetrinet.c index 3350e7f..2456665 100644 --- a/src/tetrinet.c +++ b/src/tetrinet.c @@ -231,7 +231,7 @@ void tetrinet_inmessage (enum inmsg_type msgtype, char *data) /* set up stuff */ connected = TRUE; ingame = playing = paused = FALSE; - playercount = spectating ? 0 : 1; + playercount = 0; partyline_text ("\014\02*** Connected to server"); commands_checkstate (); connectingdialog_destroy (); @@ -240,6 +240,9 @@ void tetrinet_inmessage (enum inmsg_type msgtype, char *data) else tetrix = FALSE; } if (!spectating) { + /* If we occupy a previously empty slot increase playercount */ + if (playernames[playernum][0] == 0) + playercount++; /* set own player/team info */ GTET_O_STRCPY (playernames[playernum], nick); GTET_O_STRCPY (teamnames[playernum], team);