]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/stats.qh
Merge branch 'master' into Mirio/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / stats.qh
index 2d10d9c464ab3f2b9fa9101e4a6d7990b30e00fb..bd8b792967a5cfbba7365455c12aa6044b19b2a4 100644 (file)
@@ -6,7 +6,7 @@
 #include "sort.qh"
 
 .int m_id;
-typedef vector vectori;
+USING(vectori, vector);
 
 #define REGISTER_STAT(...) EVAL_REGISTER_STAT(OVERLOAD(REGISTER_STAT, __VA_ARGS__))
 #define EVAL_REGISTER_STAT(...) __VA_ARGS__
@@ -93,7 +93,7 @@ typedef vector vectori;
     #define REGISTER_STAT_3(id, T, expr) \
        REGISTER_STAT_2(id, T); \
        [[accumulate]] void GlobalStats_update(entity this) { STAT(id, this) = (expr); } \
-       STATIC_INIT(worldstat_##id) { entity this = world; STAT(id, this) = (expr); }
+       STATIC_INIT(worldstat_##id) { entity this = NULL; STAT(id, this) = (expr); }
 #else
        #define REGISTER_STAT_2(id, type)
     #define REGISTER_STAT_3(id, T, expr)