]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.h
optimized AngleVectors calls (pass NULL for vectors that should not be generated)
[xonotic/darkplaces.git] / common.h
index da25cafa0e4634dc32a4d14158b99893852c2713..502f4cdb436416b7f82305466f0dbb79aecc8b00 100644 (file)
--- a/common.h
+++ b/common.h
@@ -120,6 +120,8 @@ void MSG_WriteCoord (sizebuf_t *sb, float f);
 void MSG_WriteAngle (sizebuf_t *sb, float f);
 void MSG_WritePreciseAngle (sizebuf_t *sb, float f);
 
+#define MSG_WriteFloatCoord MSG_WriteFloat
+
 extern int                     msg_readcount;
 extern qboolean        msg_badread;            // set if a read goes beyond end of message
 
@@ -139,9 +141,13 @@ char *MSG_ReadString (void);
 float MSG_ReadCoord (void);
 //float MSG_ReadAngle (void);
 
+#define MSG_ReadFloatCoord MSG_ReadFloat
+
 #define MSG_ReadAngle() (MSG_ReadByte() * (360.0f / 256.0f))
 #define MSG_ReadPreciseAngle() (MSG_ReadShort() * (360.0f / 65536.0f))
 
+#define MSG_ReadVector(v) {(v)[0] = MSG_ReadCoord();(v)[1] = MSG_ReadCoord();(v)[2] = MSG_ReadCoord();}
+
 extern qboolean dpprotocol;
 
 //============================================================================