]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/state.qc
Merge branch 'drjaska/damagetext' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / state.qc
index 3060a51aa5f40e29c5af984bad43d96b92bf702b..d174eeb6bac526e0bfd0a0fba21b779384456e97 100644 (file)
@@ -1,5 +1,6 @@
 #include "state.qh"
 
+#include <common/mutators/mutator/status_effects/_mod.qh>
 #include <server/command/getreplies.qh>
 
 void Inventory_new(PlayerState this);
@@ -58,6 +59,7 @@ void ClientState_attach(entity this)
        anticheat_init(this);
        W_HitPlotOpen(this);
        InventoryStorage_attach(this);
+       StatusEffectsStorage_attach(this);
 }
 
 void bot_clientdisconnect(entity this);
@@ -70,13 +72,14 @@ void PlayerScore_Detach(entity this);
 
 void ClientState_detach(entity this)
 {
-    GetCvars(this, CS(this), -1);  // free cvars TODO: is this still needed now that it's stored on the clientstate entity?
+    GetCvars(this, CS_CVAR(this), -1);  // free cvars TODO: is this still needed now that it's stored on the clientstate entity?
     accuracy_free(this); // TODO: needs to be before CS() is deleted!
     PlayerScore_Detach(this); // what ^they^ said
     W_HitPlotClose(this);
     ClientData_Detach(this);
     entcs_detach(this);
     InventoryStorage_delete(this);
+    StatusEffectsStorage_delete(this);
        delete(CS(this));
        this._cs = NULL;