When verifying objects, do not necessarily check for controlcen as it's not necessarily there in some anarchy missions
This commit is contained in:
parent
83d746151a
commit
5a6fb73ed2
|
@ -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
|
||||
--------
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue