accuracy_free(this); // TODO: needs to be before CS() is deleted!
PlayerScore_Detach(this); // what ^they^ said
W_HitPlotClose(this);
+ ClientData_Detach(this);
delete(CS(this));
this._cs = NULL;
anticheat_report_to_eventlog(this);
playerdemo_shutdown(this);
entcs_detach(this);
- ClientData_Detach(this);
}
void ClientData_Attach(entity this)
{
- Net_LinkEntity(this.clientdata = new_pure(clientdata), false, 0, ClientData_Send);
- this.clientdata.drawonlytoclient = this;
- this.clientdata.owner = this;
+ Net_LinkEntity(CS(this).clientdata = new_pure(clientdata), false, 0, ClientData_Send);
+ CS(this).clientdata.drawonlytoclient = this;
+ CS(this).clientdata.owner = this;
}
void ClientData_Detach(entity this)
{
- delete(this.clientdata);
- this.clientdata = NULL;
+ delete(CS(this).clientdata);
+ CS(this).clientdata = NULL;
}
void ClientData_Touch(entity e)
{
- e.clientdata.SendFlags = 1;
+ CS(e).clientdata.SendFlags = 1;
// make it spectatable
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != e && IS_SPEC(it) && it.enemy == e, LAMBDA(it.clientdata.SendFlags = 1));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != e && IS_SPEC(it) && it.enemy == e, LAMBDA(CS(it).clientdata.SendFlags = 1));
}
void SetSpectatee(entity this, entity spectatee);
ATTRIB(Client, scorekeeper, entity, this.scorekeeper);
ATTRIB(Client, specialcommand_pos, int, this.specialcommand_pos);
ATTRIB(Client, hitplotfh, int, this.hitplotfh);
+ ATTRIB(Client, clientdata, entity, this.clientdata);
METHOD(Client, m_unwind, bool(Client this));