]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qh
Merge branch 'master' into Mirio/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qh
index 35ff6e961c61808a8f5f3cdd0f87e288653bd4f5..c2317aff0280b46179c7bc52d3d79f95913eba7f 100644 (file)
@@ -2,6 +2,9 @@
 
 void ClientState_attach(entity this);
 
+IntrusiveList g_players;
+STATIC_INIT(g_players) { g_players = IL_NEW(); }
+
 CLASS(Client, Object)
     /** Client name */
     ATTRIB(Client, netname, string, this.netname);
@@ -71,8 +74,11 @@ ENDCLASS(Spectator)
 CLASS(Player, Client)
     INIT(Player) {
         this.classname = STR_PLAYER;
+        IL_PUSH(g_players, this);
+    }
+    DESTRUCTOR(Player) {
+        IL_REMOVE(g_players, this);
     }
-    DESTRUCTOR(Player) { }
 ENDCLASS(Player)
 
 METHOD(Client, m_unwind, bool(Client this))