]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/minigames/sv_minigames.qh
Cleanse server client commands
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / minigames / sv_minigames.qh
index 10e0a039fe3a5755bd22d4a075637150206dc449..70c9bf80581c05e797ae76b79cc3d2a69ebc649b 100644 (file)
@@ -24,13 +24,13 @@ void end_minigames();
 
 // Only sends entities to players who joined the minigame
 // Use on customizeentityforclient for gameplay entities
-bool minigame_CheckSend();
+bool minigame_CheckSend(entity this);
 
 // Check for minigame impulses
-bool MinigameImpulse(int imp);
+bool MinigameImpulse(entity this, int imp);
 
 // Parse a client command ( cmd minigame ... )
-void ClientCommand_minigame(int request, int argc, string command);
+void ClientCommand_minigame(entity caller, int request, int argc, string command);
 
 // Find the minigame_player entity for the given client entity
 entity minigame_find_player(entity client);
@@ -51,10 +51,9 @@ REGISTRY(Minigames, BITS(4))
 REGISTER_REGISTRY(Minigames)
 REGISTRY_CHECK(Minigames)
 #define REGISTER_MINIGAME(name,nicename) \
-    REGISTER(Minigames, MINIGAME_##name, m_id, new(minigame_descriptor)); \
+    REGISTER(Minigames, MINIGAME_##name, m_id, new_pure(minigame_descriptor)); \
     int name##_server_event(entity, string, ...); \
-    REGISTER_INIT_POST(MINIGAME_##name) { \
-        make_pure(this); \
+    REGISTER_INIT(MINIGAME_##name) { \
         this.netname = strzone(strtolower(#name)); \
         this.message = nicename; \
                this.minigame_event = name##_server_event; \