From 3c5ef43b0d94e9c30f340c02a55473c408bd6aa7 Mon Sep 17 00:00:00 2001 From: Spoike <acceptthis@users.sourceforge.net> Date: Wed, 17 Nov 2004 17:34:14 +0000 Subject: [PATCH] floating point orgs added git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@434 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engine/common/common.h b/engine/common/common.h index ef6735676..a999457a0 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -105,6 +105,16 @@ struct usercmd_s; extern struct usercmd_s nullcmd; +typedef union { //note: reading from packets can be misaligned + char b[4]; + short b2; + int b4; + float f; +} coorddata; +extern int sizeofcoord; +float MSG_FromCoord(coorddata c, int bytes); +coorddata MSG_ToCoord(float f, int bytes); + void MSG_WriteChar (sizebuf_t *sb, int c); void MSG_WriteByte (sizebuf_t *sb, int c); void MSG_WriteShort (sizebuf_t *sb, int c);