From dad0572b6112ed622fd0c19850e9036867f8833b Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 26 Apr 2022 23:47:06 +0200 Subject: [PATCH] Fix Welcome message "popping up multiple times in the middle of a match" --- qcsrc/server/scores.qc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 950b1114e..b6244ee24 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -210,12 +210,11 @@ bool ScoreInfo_SendEntity(entity this, entity to, int sf) } // 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 - // NOTE: CS(this) is not initialized yet when a local client connects to a local dedicated server - bool welcome_msg_too = (!CS(this) || time < CS(this).jointime + 5); + bool welcome_msg_too = (!CS(to) || time < CS(to).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); + SendWelcomemessage_msg_type(to, false, MSG_ENTITY); return true; } -- 2.39.2