Hopefully this change will make the illegible server messages on fortressone's map changes a little bit easier to track down.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5950 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e7822ff2bf
commit
bd72a60c98
2 changed files with 26 additions and 10 deletions
|
@ -1069,8 +1069,10 @@ void MSG_WriteAngle (sizebuf_t *sb, float f)
|
||||||
MSG_WriteAngle16(sb, f);
|
MSG_WriteAngle16(sb, f);
|
||||||
else if (sb->prim.anglesize==4)
|
else if (sb->prim.anglesize==4)
|
||||||
MSG_WriteFloat(sb, f);
|
MSG_WriteFloat(sb, f);
|
||||||
else
|
else if (sb->prim.anglesize==1)
|
||||||
MSG_WriteAngle8 (sb, f);
|
MSG_WriteAngle8 (sb, f);
|
||||||
|
else
|
||||||
|
Sys_Error("MSG_WriteAngle: undefined network primitive size");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2088,12 +2090,17 @@ char *MSG_ReadStringLine (void)
|
||||||
float MSG_ReadCoord (void)
|
float MSG_ReadCoord (void)
|
||||||
{
|
{
|
||||||
coorddata c = {{0}};
|
coorddata c = {{0}};
|
||||||
if (net_message.prim.coordtype == COORDTYPE_UNDEFINED)
|
unsigned char coordtype = net_message.prim.coordtype;
|
||||||
net_message.prim.coordtype = COORDTYPE_FIXED_13_3;
|
if (coordtype == COORDTYPE_UNDEFINED)
|
||||||
if ((net_message.prim.coordtype&COORDTYPE_SIZE_MASK)>sizeof(c))
|
{
|
||||||
|
static float throttle;
|
||||||
|
Con_ThrottlePrintf(&throttle, 0, CON_WARNING"MSG_ReadCoord: primitives not yet configured. assuming 13.3\n");
|
||||||
|
coordtype = COORDTYPE_FIXED_13_3;
|
||||||
|
}
|
||||||
|
if ((coordtype&COORDTYPE_SIZE_MASK)>sizeof(c))
|
||||||
return 0;
|
return 0;
|
||||||
MSG_ReadData(c.b, net_message.prim.coordtype&COORDTYPE_SIZE_MASK);
|
MSG_ReadData(c.b, coordtype&COORDTYPE_SIZE_MASK);
|
||||||
return MSG_FromCoord(c, net_message.prim.coordtype);
|
return MSG_FromCoord(c, coordtype);
|
||||||
}
|
}
|
||||||
float MSG_ReadCoordFloat (void)
|
float MSG_ReadCoordFloat (void)
|
||||||
{
|
{
|
||||||
|
@ -2163,10 +2170,14 @@ float MSG_ReadAngle16 (void)
|
||||||
}
|
}
|
||||||
float MSG_ReadAngle (void)
|
float MSG_ReadAngle (void)
|
||||||
{
|
{
|
||||||
if (!net_message.prim.anglesize)
|
int sz = net_message.prim.anglesize;
|
||||||
net_message.prim.anglesize = 1;
|
if (!sz)
|
||||||
|
{
|
||||||
switch(net_message.prim.anglesize)
|
static float throttle;
|
||||||
|
Con_ThrottlePrintf(&throttle, 0, CON_WARNING"MSG_ReadAngle: primitives not yet configured. assuming 8 bit\n");
|
||||||
|
sz = 1;
|
||||||
|
}
|
||||||
|
switch(sz)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
return MSG_ReadAngle16();
|
return MSG_ReadAngle16();
|
||||||
|
|
|
@ -725,13 +725,18 @@ void SV_SetupNetworkBuffers(qboolean bigcoords)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
//determine basic primitive sizes.
|
//determine basic primitive sizes.
|
||||||
|
svs.netprim.flags = 0;
|
||||||
if (bigcoords)
|
if (bigcoords)
|
||||||
{
|
{
|
||||||
|
if (svs.netprim.coordtype && svs.netprim.coordtype != COORDTYPE_FLOAT_32)
|
||||||
|
Con_Printf("Switching to big coords\n");
|
||||||
svs.netprim.coordtype = COORDTYPE_FLOAT_32;
|
svs.netprim.coordtype = COORDTYPE_FLOAT_32;
|
||||||
svs.netprim.anglesize = 2;
|
svs.netprim.anglesize = 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (svs.netprim.coordtype && svs.netprim.coordtype != COORDTYPE_FIXED_13_3)
|
||||||
|
Con_Printf("Switching to classic coords\n");
|
||||||
svs.netprim.coordtype = COORDTYPE_FIXED_13_3;
|
svs.netprim.coordtype = COORDTYPE_FIXED_13_3;
|
||||||
svs.netprim.anglesize = 1;
|
svs.netprim.anglesize = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue