big-endian network compatability.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1016 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-05-17 02:00:13 +00:00
parent 7c418ca423
commit 98bbcc2c94

View file

@ -693,9 +693,9 @@ float MSG_FromCoord(coorddata c, int bytes)
switch(bytes) switch(bytes)
{ {
case 2: //encode 1/8th precision, giving -4096 to 4096 map sizes case 2: //encode 1/8th precision, giving -4096 to 4096 map sizes
return c.b2/8.0f; return LittleShort(c.b2)/8.0f;
case 4: case 4:
return c.f; return LittleFloat(c.f);
default: default:
Sys_Error("MSG_ToCoord: not a sane coordsize"); Sys_Error("MSG_ToCoord: not a sane coordsize");
return 0; return 0;
@ -707,10 +707,10 @@ coorddata MSG_ToCoord(float f, int bytes) //return value should be treated as (c
switch(bytes) switch(bytes)
{ {
case 2: case 2:
r.b2 = f*8; r.b2 = LittleShort(f*8);
break; break;
case 4: case 4:
r.f = f; r.f = LittleFloat(f);
break; break;
default: default:
Sys_Error("MSG_ToCoord: not a sane coordsize"); Sys_Error("MSG_ToCoord: not a sane coordsize");