From 24ed65d7147d067ad72b9914ae3b256df3cf4949 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 17 Jul 2017 05:43:42 +1000 Subject: [PATCH] Port just_joined to ClientState --- qcsrc/server/client.qc | 8 ++++---- qcsrc/server/client.qh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) 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)); -- 2.39.2