]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - qdefs.h
cl_parse: Further optimize CL_NetworkTimeReceived
[xonotic/darkplaces.git] / qdefs.h
diff --git a/qdefs.h b/qdefs.h
index 1996d86fbcb6bad629ede75c4b4e9674c4f6a01d..463761e9b43a311993b6b182edf5f657c07b9a72 100644 (file)
--- a/qdefs.h
+++ b/qdefs.h
@@ -1,6 +1,10 @@
 #ifndef QDEFS_H
 #define QDEFS_H
 
+#if defined (__GNUC__) || defined (__clang__) || defined (__TINYC__)
+#define DP_GCC_COMPATIBLE
+#endif
+
 #if (__GNUC__ > 2) || defined (__clang__) || (__TINYC__)
 #define DP_FUNC_PRINTF(n) __attribute__ ((format (printf, n, n+1)))
 #define DP_FUNC_PURE      __attribute__ ((pure))
 #define DP_FUNC_NORETURN
 #endif
 
+#ifdef DP_GCC_COMPATIBLE
+#define Q_typeof(var) typeof(var)
+#elif defined (MSVC)
+#define Q_typeof(var) decltype(var)
+#endif
+
 #define MAX_NUM_ARGVS  50
 
 #ifdef DP_SMALLMEMORY
 #define        CMDBUFSIZE                              655360 ///< maximum script size that can be loaded by the exec command (8192 in Quake)
 #define        MAX_ARGS                                80 ///< maximum number of parameters to a console command or alias
 
-#define        NET_MAXMESSAGE                  131072 ///< max reliable packet size (sent as multiple fragments of MAX_PACKETFRAGMENT)
+#define        NET_MAXMESSAGE                  65536 ///< max reliable packet size (sent as multiple fragments of MAX_PACKETFRAGMENT)
 #define        MAX_PACKETFRAGMENT              1024 ///< max length of packet fragment
 #define        MAX_EDICTS                              32768 ///< max number of objects in game world at once (32768 protocol limit)
 #define        MAX_MODELS                              8192 ///< max number of models loaded at once (including during level transitions)