diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0ab94ebc2..76489fae2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D1X-Rebirth Changelog 20101123 -------- main/net_udp.h: reducing max buffer size of an UDP packet from 1024 to 576 bytes - should prevent possible turncating, especially when sending obejcts where max size is actually used +main/net_ipx.c, main/net_udp.c: When verifying objects, do not necessarily check for controlcen as it's not necessarily there in some anarchy missions 20101122 -------- diff --git a/main/net_ipx.c b/main/net_ipx.c index 9536d9217..602451928 100644 --- a/main/net_ipx.c +++ b/main/net_ipx.c @@ -2074,26 +2074,18 @@ net_ipx_pack_objects(void) int net_ipx_verify_objects(int remote, int local) { - int i; - int nplayers, got_controlcen=0; + int i, nplayers = 0; if ((remote-local) > 10) - return(-1); - - if (Game_mode & GM_MULTI_ROBOTS) - got_controlcen = 1; - - nplayers = 0; + return(2); for (i = 0; i <= Highest_object_index; i++) { if ((Objects[i].type == OBJ_PLAYER) || (Objects[i].type == OBJ_GHOST)) nplayers++; - if (Objects[i].type == OBJ_CNTRLCEN) - got_controlcen=1; } - if (got_controlcen && (nplayers >= MaxNumNetPlayers)) + if (MaxNumNetPlayers<=nplayers) return(0); return(1); diff --git a/main/net_udp.c b/main/net_udp.c index 6676e4de8..a0b0eebc8 100644 --- a/main/net_udp.c +++ b/main/net_udp.c @@ -2423,26 +2423,18 @@ net_udp_pack_objects(void) int net_udp_verify_objects(int remote, int local) { - int i; - int nplayers, got_controlcen=0; + int i, nplayers = 0; if ((remote-local) > 10) - return(-1); - - if (Game_mode & GM_MULTI_ROBOTS) - got_controlcen = 1; - - nplayers = 0; + return(2); for (i = 0; i <= Highest_object_index; i++) { if ((Objects[i].type == OBJ_PLAYER) || (Objects[i].type == OBJ_GHOST)) nplayers++; - if (Objects[i].type == OBJ_CNTRLCEN) - got_controlcen=1; } - if (got_controlcen && (MaxNumNetPlayers<=nplayers)) + if (MaxNumNetPlayers<=nplayers) return(0); return(1);