From 692a9f6a9842af6008900ea161f18bf09a52dfb2 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 10 Apr 2022 23:13:39 +0200 Subject: [PATCH] Fix #2684 "The welcome dialog randomly fails to appear" This commit partially reverts 47d309fd (only the "Don't send the welcome message twice on connection." part, the remaining part is implemented in a different way) --- qcsrc/server/scores.qc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 38fd7f40e..7e90b4f08 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) } } -.bool welcome_msg_already_sent_on_connection; bool ScoreInfo_SendEntity(entity this, entity to, int sf) { float i; @@ -209,14 +208,13 @@ bool ScoreInfo_SendEntity(entity this, entity to, int sf) WriteString(MSG_ENTITY, teamscores_label(i)); WriteByte(MSG_ENTITY, teamscores_flags(i)); } - bool welcome_msg_too = (!to.welcome_msg_already_sent_on_connection); + // prevent sending the welcome message again when score types are sent again because the scoring system has changed + // it can happen in some game modes like Race when the qualyfing session ends and the race starts + bool welcome_msg_too = (time < CS(this).jointime + 5); WriteByte(MSG_ENTITY, welcome_msg_too); // welcome message is sent here because it needs to know the gametype if (welcome_msg_too) - { SendWelcomemessage_msg_type(this, false, MSG_ENTITY); - to.welcome_msg_already_sent_on_connection = true; - } return true; } -- 2.39.2