From 26e5647888ec84cb207a7f68dac7dca2aeda0578 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 31 Mar 2022 15:05:08 +0200 Subject: [PATCH 1/1] Revert buggy implementation of sending the welcome message only once on connection --- qcsrc/client/main.qc | 3 +-- qcsrc/server/scores.qc | 12 +++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 238ce891a2..75fb7169e1 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -1053,8 +1053,7 @@ NET_HANDLE(ENT_CLIENT_SCORES_INFO, bool isnew) strcpy(teamscores_label(i), ReadString()); teamscores_flags(i) = ReadByte(); } - if (ReadByte()) - net_handle_ServerWelcome(); + net_handle_ServerWelcome(); return = true; Scoreboard_InitScores(); Gamemode_Init(); diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index ac3f52c72f..18f5cacc68 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -194,7 +194,6 @@ void ScoreInfo_SetLabel_TeamScore(float i, string label, float scoreflags) } } -int Welcomemessage_too = 1; bool ScoreInfo_SendEntity(entity this, entity to, int sf) { float i; @@ -209,15 +208,10 @@ bool ScoreInfo_SendEntity(entity this, entity to, int sf) WriteString(MSG_ENTITY, teamscores_label(i)); WriteByte(MSG_ENTITY, teamscores_flags(i)); } - WriteByte(MSG_ENTITY, Welcomemessage_too); // for some reason ScoreInfo_SendEntity is called twice on client connection - // send the welcome message only once - if (Welcomemessage_too) - { - // welcome message is sent here because it needs to know the gametype - SendWelcomemessage_msg_type(this, false, MSG_ENTITY); - Welcomemessage_too = 0; - } + // FIXME send the welcome message only once + // welcome message is sent here because it needs to know the gametype + SendWelcomemessage_msg_type(this, false, MSG_ENTITY); return true; } -- 2.39.2