diff --git a/ChangeLog b/ChangeLog index c5d81fd..09e01c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Version 0.9.9 ============= fix2 +- fixed: remove network flag from disconected players + so we won't send data to players in the game which + have already disconnected + - fixed: player_findfreebomb - trigger bomb + bomblaying illness have let explode always a bomb at your place. diff --git a/TODO b/TODO index ee92d80..1633f3d 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ this version (fix2): ==================== - pushing bombs and wrong directin illness -- network timedout to already disconected players - special trigger bomb over.. all trigger bombs have to be to normal bombs. diff --git a/src/network.c b/src/network.c index 2d6e1c6..9c112ff 100644 --- a/src/network.c +++ b/src/network.c @@ -1,4 +1,4 @@ -/* $Id: network.c,v 1.33 2003/06/12 20:52:45 stpohle Exp $ */ +/* $Id: network.c,v 1.34 2003/07/08 22:18:33 stpohle Exp $ */ /* network routines. */ @@ -629,7 +629,8 @@ net_delplayer (int pl_nr) strncpy (host, bman.players[pl_nr].net.addr.host, LEN_SERVERNAME); strncpy (port, bman.players[pl_nr].net.addr.port, LEN_PORT); - bman.players[pl_nr].state &= (0xFF - (PSF_used + PSF_alife)); // Delete the used flag + bman.players[pl_nr].state &= (0xFF - (PSF_used + PSF_net + PSF_alife)); /* delete + player flags */ bman.players[pl_nr].net.net_istep = 0; // needed for disconnect during the update bman.players_nr_s--; bman.players[pl_nr].gfx_nr = -1; @@ -646,7 +647,7 @@ net_delplayer (int pl_nr) } } - if (GT_MP_PTPS && pl_nr == 0) /* masterserver quit */ + if (GT_MP_PTPS && pl_nr == 0) /* server quit */ bman.state = GS_startup; if (GT_MP_PTPM && bman.notifygamemaster) diff --git a/src/packets.c b/src/packets.c index 88d5263..83fa631 100644 --- a/src/packets.c +++ b/src/packets.c @@ -14,7 +14,6 @@ extern int debug_lastping; static short int pkg_lastid; /* the packet id, this will only counted up nothing more.. if we are at 0x10000 we will start at 0 */ -static signed char debug_lastpkgtyp = -1; struct _resend_cache resend_cache; struct _inpkg_index inpkg_index[PKG_IN_INDEX_NUM]; @@ -293,7 +292,10 @@ send_servermode (_net_addr * addr, int pl_nr) s_mod.h.len = sizeof (struct pkg_servermode); s_mod.h.flags = PKGF_ackreq; s_mod.type = bman.gametype; - s_mod.state = bman.state; + if (bman.state == GS_quit) /* do not send GS_quit */ + s_mod.state = GS_startup; + else + s_mod.state = bman.state; s_mod.multitype = bman.multitype; s_mod.players = bman.players_nr_s; s_mod.maxplayer = bman.maxplayer; @@ -1085,11 +1087,6 @@ do_pkg (struct pkg *packet, _net_addr * addr) if (GT_MP_PTPM) fwd_pkg (packet, addr); - if (debug_lastpkgtyp != packet->h.typ && debug) { - debug_lastpkgtyp = packet->h.typ; - printf ("NEW PKGTYP (%d)\n", debug_lastpkgtyp); - } - switch (packet->h.typ) { case (PKG_error): if (do_error ((struct pkg_error *) packet, addr) < 0)