]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/_all.inc
Disable matrix if XONOTIC isn't defined
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / _all.inc
index d121f1e661371e121a65d56e358ebb4ddbc39ac3..136c4e7f6ffb4ff7b7dc4d56a50c62f2478c15db 100644 (file)
@@ -55,7 +55,7 @@
 #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
@@ -89,6 +89,7 @@ void    isnt_bool(float this) { print(ftos(this)); }
 #include "file.qh"
 #include "functional.qh"
 #include "i18n.qh"
+#include "intrusivelist.qh"
 #include "iter.qh"
 #include "json.qc"
 #include "lazy.qh"
@@ -121,7 +122,25 @@ 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)
+#else
+void make_safe_for_remove(entity this);
+    #define objerror_safe(e) make_safe_for_remove(e)
+#endif
+
+#define objerror(this, msg) MACRO_BEGIN { \
+       LOG_WARN("======OBJECT ERROR======"); \
+       entity _e = (this); \
+       eprint(_e); \
+       objerror_safe(_e); \
+       delete(_e); \
+       LOG_WARNF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); \
+} MACRO_END
 
 #ifdef MENUQC
        void _m_init();
@@ -166,6 +185,12 @@ void    isnt_bool(float this) { print(ftos(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
@@ -248,3 +273,9 @@ void    isnt_bool(float this) { print(ftos(this)); }
        #define CSQC_Ent_Remove _CSQC_Ent_Remove
 #endif
 #undef ENGINE_EVENT
+
+#if XONOTIC
+#ifdef GAMEQC
+       #include <ecs/_mod.qh>
+#endif
+#endif