]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/scores.qc
Cut off long names in the duel centerprint title (same scoreboard limit)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / scores.qc
index 07c400f5d3bf31337449629435cfe5f1dc5949c7..b6244ee24ba2a5e8eb820e9a59581433f8c34374 100644 (file)
@@ -208,6 +208,13 @@ bool ScoreInfo_SendEntity(entity this, entity to, int sf)
                WriteString(MSG_ENTITY, teamscores_label(i));
                WriteByte(MSG_ENTITY, teamscores_flags(i));
        }
+       // 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 = (!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(to, false, MSG_ENTITY);
        return true;
 }