]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Improve support for per-player counters by spawning an entity to store the player...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index 79dca007633967ec8499d0a7b3c7e50054f15bf8..cb26ccc1fccc9c08be1bc46a4cf85bcd20842d8a 100644 (file)
@@ -690,6 +690,10 @@ void PutPlayerInServer(entity this)
                IL_REMOVE(g_swamped, this);
        this.swampslug = NULL;
        this.swamp_interval = 0;
+       IL_EACH(g_counters, it.realowner == this,
+       {
+               delete(it);
+       });
        STAT(HUD, this) = HUD_NORMAL;
 
        this.event_damage = PlayerDamage;
@@ -1233,6 +1237,11 @@ void ClientDisconnect(entity this)
        if (this.chatbubbleentity) delete(this.chatbubbleentity);
        if (this.killindicator) delete(this.killindicator);
 
+       IL_EACH(g_counters, it.realowner == this,
+       {
+               delete(it);
+       });
+
        WaypointSprite_PlayerGone(this);
 
        bot_relinkplayerlist();