]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/_all.inc
Remove some old useless definitions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / _all.inc
index b0c9ec901c76103dae5531c9bb0136b7ace93471..b8d78cd0419e209ff8eca3a62e96240ac4d99bfe 100644 (file)
@@ -2,6 +2,18 @@
        #define COMPAT_NO_MOD_IS_XONOTIC
 #endif
 
+#ifdef CSQC
+#define IS_CSQC 1
+#else
+#define IS_CSQC 0
+#endif
+
+#ifdef SVQC
+#define IS_SVQC 1
+#else
+#define IS_SVQC 0
+#endif
+
 #include "compiler.qh"
 
 #ifndef QCC_SUPPORT_INT
 #else
        #define TC(T, sym) MACRO_BEGIN \
                if (!is_##T(sym)) { \
-                       LOG_WARNINGF("Type check failed: " #sym " :: " #T); \
+                       LOG_WARNF("Type check failed: " #sym " :: " #T); \
                        isnt_##T(sym); \
                } \
        MACRO_END
 #endif
 
-#define   is_float(this) (true || ftoe(this))
-#define isnt_float(this)
-#define   is_vector(this) (true || vtos(this))
-#define isnt_vector(this)
-#define   is_string(this) (true || stof(this))
-#define isnt_string(this)
-#define   is_entity(this) (true || etof(this))
-#define isnt_entity(this)
-bool      is_int(float this) { return this == floor(this); }
-void    isnt_int(float this) { print(ftos(this)); }
-bool      is_bool(float this) { return this == true || this == false; }
-void    isnt_bool(float this) { print(ftos(this)); }
+#if !(NDEBUG)
+       #define   is_float(this) (true || ftoe(this))
+       #define isnt_float(this)
+       #define   is_vector(this) (true || vtos(this))
+       #define isnt_vector(this)
+       #define   is_string(this) (true || stof(this))
+       #define isnt_string(this)
+       #define   is_entity(this) (true || etof(this))
+       #define isnt_entity(this)
+       bool      is_int(float this) { return this == floor(this); }
+       void    isnt_int(float this) { print(ftos(this)); }
+       bool      is_bool(float this) { return this == true || this == false; }
+       void    isnt_bool(float this) { print(ftos(this)); }
+#endif
 
 #include "warpzone/mathlib.qc"
 
@@ -110,7 +124,9 @@ void    isnt_bool(float this) { print(ftos(this)); }
 #include "vector.qh"
 #include "yenc.qh"
 
-#include "matrix/_mod.inc"
+#if XONOTIC
+       #include "matrix/_mod.inc"
+#endif
 
 #ifndef SVQC
 #define objerror_safe(e)
@@ -120,12 +136,12 @@ void make_safe_for_remove(entity this);
 #endif
 
 #define objerror(this, msg) MACRO_BEGIN { \
-       LOG_WARNING("======OBJECT ERROR======"); \
+       LOG_WARN("======OBJECT ERROR======"); \
        entity _e = (this); \
        eprint(_e); \
        objerror_safe(_e); \
        delete(_e); \
-       LOG_WARNINGF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); \
+       LOG_WARNF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); \
 } MACRO_END
 
 #ifdef MENUQC
@@ -171,6 +187,12 @@ void make_safe_for_remove(entity this);
        void SetChangeParms() { ENGINE_EVENT(); if (_SetChangeParms) _SetChangeParms(this); }
        #define SetChangeParms _SetChangeParms
 
+#ifdef DP_EXT_PRECONNECT
+       void _ClientPreConnect(entity this);
+       void ClientPreConnect() { ENGINE_EVENT(); if (_ClientPreConnect) _ClientPreConnect(this); }
+       #define ClientPreConnect _ClientPreConnect
+#endif
+
        void _ClientConnect(entity this);
        void ClientConnect() { ENGINE_EVENT(); if (_ClientConnect) _ClientConnect(this); }
        #define ClientConnect _ClientConnect
@@ -253,3 +275,9 @@ void make_safe_for_remove(entity this);
        #define CSQC_Ent_Remove _CSQC_Ent_Remove
 #endif
 #undef ENGINE_EVENT
+
+#if XONOTIC
+#ifdef GAMEQC
+       #include <ecs/_mod.qh>
+#endif
+#endif