]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Port just_joined to ClientState
authorMario <mario@smbclan.net>
Sun, 16 Jul 2017 19:43:42 +0000 (05:43 +1000)
committerMario <mario@smbclan.net>
Sun, 16 Jul 2017 19:43:42 +0000 (05:43 +1000)
qcsrc/server/client.qc
qcsrc/server/client.qh

index ec6d292d9f9de701c43360c370b662a1aceaa02a..2bab814a2950b48ce66af8d5d4e0c52d94cdbb39 100644 (file)
@@ -281,10 +281,10 @@ void PutObserverInServer(entity this)
                if(autocvar_g_chat_nospectators == 1 || (!warmup_stage && autocvar_g_chat_nospectators == 2))
                        Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_CHAT_NOSPECTATORS);
 
-               if(this.just_joined == false) {
+               if(!CS(this).just_joined)
                        LogTeamchange(this.playerid, -1, 4);
-               else
-                       this.just_joined = false;
+               else
+                       CS(this).just_joined = false;
        }
 
        accuracy_resend(this);
@@ -1190,7 +1190,7 @@ void ClientConnect(entity this)
 
        LogTeamchange(this.playerid, this.team, 1);
 
-       this.just_joined = true;  // stop spamming the eventlog with additional lines when the client connects
+       CS(this).just_joined = true;  // stop spamming the eventlog with additional lines when the client connects
 
        CS(this).netname_previous = strzone(this.netname);
 
index ae4a08f90f6c7f11b4b5373ccfbf9ab0cd104ad9..02caceb7d2d3f4fb411c49245edf8becc04e6533 100644 (file)
@@ -93,6 +93,7 @@ CLASS(Client, Object)
     ATTRIB(Client, version, int, this.version);
     ATTRIB(Client, spectatee_status, int, this.spectatee_status);
     ATTRIB(Client, zoomstate, bool, this.zoomstate);
+    ATTRIB(Client, just_joined, bool, this.just_joined);
 
     METHOD(Client, m_unwind, bool(Client this));