#include "state.qh"
-void Inventory_new(entity this);
+void Inventory_new(PlayerState this);
void Inventory_delete(entity this);
void PlayerState_attach(entity this)
{
+ if (PS(this))
+ return;
+
this._ps = NEW(PlayerState, this);
Inventory_new(PS(this));
{
this._cs = NEW(ClientState, this);
- GetCvars(this, CS(this), 0); // get other cvars from player
-
// TODO: fold all of these into ClientState
DecodeLevelParms(this);
PlayerScore_Detach(this); // what ^they^ said
W_HitPlotClose(this);
ClientData_Detach(this);
+ entcs_detach(this);
delete(CS(this));
this._cs = NULL;
-
bot_clientdisconnect(this);
anticheat_report_to_eventlog(this);
- entcs_detach(this);
}