From: Mario Date: Sun, 16 Jul 2017 19:43:42 +0000 (+1000) Subject: Port just_joined to ClientState X-Git-Tag: xonotic-v0.8.5~2590 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=24ed65d7147d067ad72b9914ae3b256df3cf4949;p=xonotic%2Fxonotic-data.pk3dir.git Port just_joined to ClientState --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index ec6d292d9..2bab814a2 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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); diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index ae4a08f90..02caceb7d 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -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));