]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/minigames/minigames.qc
Fix assault and clean up some self uses
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / minigames / minigames.qc
index c2392ae0e0a733bd154e56ca7bdb6cd1a7075ab5..71cf41a3aa44340d471491aad35b2e893ff19a0c 100644 (file)
@@ -1,12 +1,11 @@
 #include "minigames.qh"
 
+REGISTER_NET_LINKED(ENT_CLIENT_MINIGAME)
+
 entity minigame_get_descriptor(string id)
 {
-       entity e;
-       for ( e = minigame_descriptors; e != world; e = e.list_next )
-               if ( e.netname == id )
-                       return e;
-       return world;
+       FOREACH(Minigames, it.netname == id, return it);
+       return NULL;
 }
 
 // Get letter index of a tile name
@@ -135,3 +134,10 @@ int minigame_count_players(entity minigame)
                pl_num++;
        return pl_num;
 }
+
+#ifdef CSQC
+#include "cl_minigames.qc"
+#endif
+#ifdef SVQC
+#include "sv_minigames.qc"
+#endif