From 98bbcc2c94ac0ac3a5271962ee0a56c293456f61 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 17 May 2005 02:00:13 +0000 Subject: [PATCH] big-endian network compatability. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1016 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/common/common.c b/engine/common/common.c index bc70c1c24..c18b7bd04 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -693,9 +693,9 @@ float MSG_FromCoord(coorddata c, int bytes) switch(bytes) { 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: - return c.f; + return LittleFloat(c.f); default: Sys_Error("MSG_ToCoord: not a sane coordsize"); return 0; @@ -707,10 +707,10 @@ coorddata MSG_ToCoord(float f, int bytes) //return value should be treated as (c switch(bytes) { case 2: - r.b2 = f*8; + r.b2 = LittleShort(f*8); break; case 4: - r.f = f; + r.f = LittleFloat(f); break; default: Sys_Error("MSG_ToCoord: not a sane coordsize");