FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != e && IS_SPEC(it) && it.enemy == e, LAMBDA(it.clientdata.SendFlags = 1));
}
-.string netname_previous;
-
void SetSpectatee(entity this, entity spectatee);
void SetSpectatee_status(entity this, int spectatee_num);
this.just_joined = true; // stop spamming the eventlog with additional lines when the client connects
- this.netname_previous = strzone(this.netname);
+ CS(this).netname_previous = strzone(this.netname);
if(teamplay && IS_PLAYER(this))
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_JOIN_CONNECT_TEAM), this.netname);
bot_relinkplayerlist();
- if (this.netname_previous) strunzone(this.netname_previous);
+ if (CS(this).netname_previous) strunzone(CS(this).netname_previous);
if (this.clientstatus) strunzone(this.clientstatus);
if (this.weaponorder_byimpulse) strunzone(this.weaponorder_byimpulse);
if (this.personal) delete(this.personal);
this.netname = strzone(sprintf("Player#%d", this.playerid));
// stuffcmd(this, strcat("name ", this.netname, "\n")); // maybe?
}
- if (this.netname != this.netname_previous) {
+ if (this.netname != CS(this).netname_previous) {
if (autocvar_sv_eventlog) {
GameLogEcho(strcat(":name:", ftos(this.playerid), ":", playername(this, false)));
}
- if (this.netname_previous) strunzone(this.netname_previous);
- this.netname_previous = strzone(this.netname);
+ if (CS(this).netname_previous) strunzone(CS(this).netname_previous);
+ CS(this).netname_previous = strzone(this.netname);
}
// version nagging
ATTRIB(Client, jointime, float, this.jointime);
ATTRIB(Client, spectatortime, float, this.spectatortime);
ATTRIB(Client, version_nagtime, float, this.version_nagtime);
+ ATTRIB(Client, netname_previous, string, this.netname_previous);
METHOD(Client, m_unwind, bool(Client this));