worldspawn: set 'gametitle' serverinfo when applicable

This commit is contained in:
Marco Cawthorne 2023-09-27 14:07:08 -07:00
parent 2dbfeb06b6
commit 7420df0ec6
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -61,6 +61,7 @@ public:
private:
string m_strSkyName;
bool m_bStartDark;
bool m_bGameTitle;
string m_strChapterTitle;
string m_strAmbientSound;
string m_strBGMTrack;
@ -139,6 +140,7 @@ worldspawn::Spawned(void)
forceinfokey(world, "chaptertitle", m_strChapterTitle);
forceinfokey(world, "ambientsound", m_strAmbientSound);
forceinfokey(world, "bgm", m_strBGMTrack);
forceinfokey(world, "gametitle", ftos(m_bGameTitle));
if (m_bHDREnabled) {
forceinfokey(world, "hdr_iris_minvalue", ftos(m_flHDRIrisMinValue));
@ -173,6 +175,9 @@ worldspawn::SpawnKey(string strKey, string strValue)
case "ambientsound":
m_strAmbientSound = ReadString(strValue);
break;
case "gametitle":
m_bGameTitle = ReadBool(strValue);
break;
/* Household Death */
case "_bgm":
m_strBGMTrack = ReadString(strValue);
@ -225,8 +230,9 @@ WorldSpawn_Init(void)
float hdrFadeDown = serverkeyfloat("hdr_iris_fade_down");
bool hdrEnabled = serverkeyfloat("hdr");
if (startDark == true)
if (startDark == true) {
Fade_StartDark();
}
if (chapterTitle) {
GameMessage_Setup(chapterTitle, 0);