From: Mario Date: Sun, 15 Oct 2017 07:24:15 +0000 (+1000) Subject: Revert previous "fix" (didn't work) X-Git-Tag: xonotic-v0.8.5~2446 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5f5f2c30522d20dc744231d9d1d617a35184930d;p=xonotic%2Fxonotic-data.pk3dir.git Revert previous "fix" (didn't work) --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 823bb4802..74bbeba54 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1304,7 +1304,6 @@ Called when a client disconnects from the server ============= */ .entity chatbubbleentity; -.string netname_previous; void ReadyCount(); void ClientDisconnect(entity this) { @@ -1325,7 +1324,7 @@ void ClientDisconnect(entity this) MUTATOR_CALLHOOK(ClientDisconnect, this); - if (this.netname_previous) strunzone(this.netname_previous); // needs to be before the CS entity is removed! + if (CS(this).netname_previous) strunzone(CS(this).netname_previous); // needs to be before the CS entity is removed! ClientState_detach(this); Portal_ClearAll(this); @@ -2498,7 +2497,7 @@ void PlayerPreThink (entity this) zoomstate_set = false; // Check for nameless players - if (this.netname == "" || this.netname != this.netname_previous) + if (this.netname == "" || this.netname != CS(this).netname_previous) { if (isInvisibleString(this.netname)) { @@ -2508,8 +2507,8 @@ void PlayerPreThink (entity this) 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 diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 71df6e98c..2282c09cb 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -87,6 +87,7 @@ CLASS(Client, Object) 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); ATTRIB(Client, allowed_timeouts, int, this.allowed_timeouts); ATTRIB(Client, active_minigame, entity, this.active_minigame); ATTRIB(Client, taunt_soundtime, float, this.taunt_soundtime);