]> de.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 a9dad19e01e2262500fc7ad7d39c91b0d802f6ba..502f4cdb436416b7f82305466f0dbb79aecc8b00 100644 (file)
--- a/common.h
+++ b/common.h
@@ -146,6 +146,8 @@ float MSG_ReadCoord (void);
 #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;
 
 //============================================================================