]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qh
Revert alignment of bots.txt (it uses the \t character to sort), also bring back...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qh
index 35ff6e961c61808a8f5f3cdd0f87e288653bd4f5..37e5eeb94d59bf8f8b7d05b184cb9de84298af15 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);
@@ -50,7 +53,7 @@ CLASS(Client, Object)
         CONSTRUCT(Client);
         this.netname = name;
         this.netaddress = "local";
-        this.playermodel = "models/player/megaerebus.iqm";
+        this.playermodel = cvar_defstring("sv_defaultplayermodel");
     }
 ENDCLASS(Client)
 
@@ -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))