]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/base.qh
Merge branch 'master' into martin-t/globals
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / base.qh
index b9a69caf93ea75990fe7c50b2640c62d74d9de13..c1d658576e2cb4b22e43a7e6446356312467265f 100644 (file)
@@ -318,10 +318,16 @@ MACRO_END
     bool mut##_##cb() { return = false; } \
     ACCUMULATE bool mut##_##cb()
 
+void _mutPrintFail(string cb, string func)
+{
+       // this is inside a function to avoid expanding it on compilation everytime
+       LOG_INFO("HOOK FAILED: ", cb, ":", func);
+}
+
 #define MUTATOR_HOOK(cb, func, order) MACRO_BEGIN \
     MUTATOR_ONADD { \
         if (!CallbackChain_Add(HOOK_##cb, CB_##func, order)) { \
-            LOG_INFO("HOOK FAILED: ", #cb, ":", #func); \
+            _mutPrintFail(#cb, #func); \
             return true; \
         } \
     } \