3 void Inventory_new(entity this);
4 void Inventory_delete(entity this);
6 void PlayerState_attach(entity this)
8 this._ps = NEW(PlayerState, this);
13 void PlayerState_detach(entity this)
15 PlayerState ps = PS(this);
16 if (!ps) return; // initial connect
18 if (ps.m_client != this) return; // don't own state, spectator
19 FOREACH_CLIENT(PS(it) == ps, { PS(it) = NULL; });
22 Inventory_delete(this);
25 void GetCvars(entity this, int);
26 void DecodeLevelParms(entity this);
27 void PlayerScore_Attach(entity this);
28 void ClientData_Attach(entity this);
29 void accuracy_init(entity this);
30 void entcs_attach(entity this);
31 void playerdemo_init(entity this);
32 void anticheat_init(entity this);
33 void W_HitPlotOpen(entity this);
34 void bot_clientconnect(entity this);
36 void ClientState_attach(entity this)
38 this._cs = NEW(ClientState, this);
40 GetCvars(this, 0); // get other cvars from player
42 if (IS_REAL_CLIENT(this)) { PlayerStats_PlayerBasic_CheckUpdate(this); }
44 // TODO: fold all of these into ClientState
46 DecodeLevelParms(this);
48 PlayerScore_Attach(this);
49 ClientData_Attach(this);
52 playerdemo_init(this);
56 bot_clientconnect(this);
59 void bot_clientdisconnect(entity this);
60 void W_HitPlotClose(entity this);
61 void anticheat_report(entity this);
62 void playerdemo_shutdown(entity this);
63 void entcs_detach(entity this);
64 void accuracy_free(entity this);
65 void ClientData_Detach(entity this);
66 void PlayerScore_Detach(entity this);
68 void ClientState_detach(entity this)
73 GetCvars(this, -1); // free cvars
75 bot_clientdisconnect(this);
78 anticheat_report(this);
79 playerdemo_shutdown(this);
82 ClientData_Detach(this);
83 PlayerScore_Detach(this);