]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert previous "fix" (didn't work)
authorMario <mario@smbclan.net>
Sun, 15 Oct 2017 07:24:15 +0000 (17:24 +1000)
committerMario <mario@smbclan.net>
Sun, 15 Oct 2017 07:30:18 +0000 (17:30 +1000)
qcsrc/server/client.qc
qcsrc/server/client.qh

index 823bb48027e22b279dfb93e1388e8dc18eaa93ba..74bbeba54e66229796cacdecf9cf58d631febdbd 100644 (file)
@@ -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
index 71df6e98c654e9d8d3488fa2a97fc0e0b77a937e..2282c09cbb1cafd54e3a667886430b98b554c342 100644 (file)
@@ -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);