mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
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:
parent
7c418ca423
commit
98bbcc2c94
1 changed files with 4 additions and 4 deletions
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue