From: terencehill Date: Sun, 10 Apr 2022 21:13:39 +0000 (+0200) Subject: Fix #2684 "The welcome dialog randomly fails to appear" X-Git-Tag: xonotic-v0.8.5~90 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=692a9f6a9842af6008900ea161f18bf09a52dfb2;p=xonotic%2Fxonotic-data.pk3dir.git 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) --- 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; }