]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert buggy implementation of sending the welcome message only once on connection
authorterencehill <piuntn@gmail.com>
Thu, 31 Mar 2022 13:05:08 +0000 (15:05 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 31 Mar 2022 13:05:08 +0000 (15:05 +0200)
qcsrc/client/main.qc
qcsrc/server/scores.qc

index 238ce891a2bada7c0fa4b65451a311cca23aa6c3..75fb7169e1017755cef2531825d0f9f68c5d5cca 100644 (file)
@@ -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();
index ac3f52c72f446fb29ec0074d9eb43dfe6d2bbe9f..18f5cacc68fb427d3346b98aa98fb1a6f7b701e7 100644 (file)
@@ -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;
 }