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
19 if (ps.m_client != this) return; // don't own state, spectator
22 FOREACH_CLIENT(PS(it) == ps, { PS(it) = NULL; });
25 Inventory_delete(this);
28 void GetCvars(entity this, int);
29 void DecodeLevelParms(entity this);
30 void PlayerScore_Attach(entity this);
31 void ClientData_Attach(entity this);
32 void accuracy_init(entity this);
33 void entcs_attach(entity this);
34 void playerdemo_init(entity this);
35 void anticheat_init(entity this);
36 void W_HitPlotOpen(entity this);
37 void bot_clientconnect(entity this);
39 void ClientState_attach(entity this)
41 this._cs = NEW(ClientState, this);
43 GetCvars(this, 0); // get other cvars from player
45 // TODO: fold all of these into ClientState
47 DecodeLevelParms(this);
49 PlayerScore_Attach(this);
50 PlayerStats_PlayerBasic_CheckUpdate(this);
51 ClientData_Attach(this);
54 playerdemo_init(this);
58 bot_clientconnect(this);
61 void bot_clientdisconnect(entity this);
62 void W_HitPlotClose(entity this);
63 void anticheat_report_to_eventlog(entity this);
64 void playerdemo_shutdown(entity this);
65 void entcs_detach(entity this);
66 void accuracy_free(entity this);
67 void ClientData_Detach(entity this);
68 void PlayerScore_Detach(entity this);
70 void ClientState_detach(entity this)
75 GetCvars(this, -1); // free cvars
77 bot_clientdisconnect(this);
80 anticheat_report_to_eventlog(this);
81 playerdemo_shutdown(this);
84 ClientData_Detach(this);
85 PlayerScore_Detach(this);