network won't send data to disconnected player in the game.

origin
stpohle 23 years ago
parent 1bcfb8fd15
commit 18693a2620

@ -2,6 +2,10 @@ Version 0.9.9
============= =============
fix2 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 - fixed: player_findfreebomb
- trigger bomb + bomblaying illness have - trigger bomb + bomblaying illness have
let explode always a bomb at your place. let explode always a bomb at your place.

@ -2,7 +2,6 @@ this version (fix2):
==================== ====================
- pushing bombs and wrong directin illness - pushing bombs and wrong directin illness
- network timedout to already disconected players
- special trigger bomb over.. all trigger bombs have to be - special trigger bomb over.. all trigger bombs have to be
to normal bombs. to normal bombs.

@ -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. network routines.
*/ */
@ -629,7 +629,8 @@ net_delplayer (int pl_nr)
strncpy (host, bman.players[pl_nr].net.addr.host, LEN_SERVERNAME); strncpy (host, bman.players[pl_nr].net.addr.host, LEN_SERVERNAME);
strncpy (port, bman.players[pl_nr].net.addr.port, LEN_PORT); 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[pl_nr].net.net_istep = 0; // needed for disconnect during the update
bman.players_nr_s--; bman.players_nr_s--;
bman.players[pl_nr].gfx_nr = -1; 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; bman.state = GS_startup;
if (GT_MP_PTPM && bman.notifygamemaster) if (GT_MP_PTPM && bman.notifygamemaster)

@ -14,7 +14,6 @@ extern int debug_lastping;
static short int pkg_lastid; /* the packet id, this will only counted static short int pkg_lastid; /* the packet id, this will only counted
up nothing more.. if we are at 0x10000 up nothing more.. if we are at 0x10000
we will start at 0 */ we will start at 0 */
static signed char debug_lastpkgtyp = -1;
struct _resend_cache resend_cache; struct _resend_cache resend_cache;
struct _inpkg_index inpkg_index[PKG_IN_INDEX_NUM]; struct _inpkg_index inpkg_index[PKG_IN_INDEX_NUM];
@ -293,6 +292,9 @@ send_servermode (_net_addr * addr, int pl_nr)
s_mod.h.len = sizeof (struct pkg_servermode); s_mod.h.len = sizeof (struct pkg_servermode);
s_mod.h.flags = PKGF_ackreq; s_mod.h.flags = PKGF_ackreq;
s_mod.type = bman.gametype; s_mod.type = bman.gametype;
if (bman.state == GS_quit) /* do not send GS_quit */
s_mod.state = GS_startup;
else
s_mod.state = bman.state; s_mod.state = bman.state;
s_mod.multitype = bman.multitype; s_mod.multitype = bman.multitype;
s_mod.players = bman.players_nr_s; s_mod.players = bman.players_nr_s;
@ -1085,11 +1087,6 @@ do_pkg (struct pkg *packet, _net_addr * addr)
if (GT_MP_PTPM) if (GT_MP_PTPM)
fwd_pkg (packet, addr); 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) { switch (packet->h.typ) {
case (PKG_error): case (PKG_error):
if (do_error ((struct pkg_error *) packet, addr) < 0) if (do_error ((struct pkg_error *) packet, addr) < 0)

Loading…
Cancel
Save