|
|
|
@ -245,11 +245,15 @@ do_contest (struct pkg_contest *ct_pkg, _net_addr * addr)
|
|
|
|
|
|
|
|
|
|
/* master will have to change the firewall flag on a player */
|
|
|
|
|
if (GT_MP_PTPM) {
|
|
|
|
|
if (ct_pkg->from < 0 || ct_pkg->from >= MAX_PLAYERS) {
|
|
|
|
|
if ((ct_pkg->to < 0 || ct_pkg->to >= MAX_PLAYERS) && addr->pl_nr != ct_pkg->from)
|
|
|
|
|
d_printf (" from or to value out of range (0-MAX_PLAYERS)\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ((ct_pkg->from < 0 || ct_pkg->from >= MAX_PLAYERS
|
|
|
|
|
|| ct_pkg->to < -1 || ct_pkg->to >= MAX_PLAYERS
|
|
|
|
|
|| addr->pl_nr != ct_pkg->from) {
|
|
|
|
|
d_printf (" from or to value out of range (0-MAX_PLAYERS)\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
/* ignore packet it's just a workaround for
|
|
|
|
|
* some hardware router */
|
|
|
|
|
if ((ct_pkg->to == -1) return;
|
|
|
|
|
|
|
|
|
|
players[ct_pkg->to].net.flags &= (0xFF - NETF_firewall);
|
|
|
|
|
net_game_send_player (ct_pkg->to);
|
|
|
|
@ -371,6 +375,8 @@ do_playerid (struct pkg_playerid *p_id, _net_addr * addr)
|
|
|
|
|
else
|
|
|
|
|
pl->state = p_id->state & (0xFF - PSF_alife);
|
|
|
|
|
|
|
|
|
|
/* set the NETWORK flag for the network player.
|
|
|
|
|
* this had to be done after the contest part. */
|
|
|
|
|
if (p_id->pl_nr != bman.p_nr && PS_IS_used (pl->state))
|
|
|
|
|
pl->state |= PSF_net;
|
|
|
|
|
else
|
|
|
|
|