From 7420df0ec636e35e4c4a226a7c58813379185289 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Wed, 27 Sep 2023 14:07:08 -0700 Subject: [PATCH] worldspawn: set 'gametitle' serverinfo when applicable --- src/gs-entbase/shared/worldspawn.qc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gs-entbase/shared/worldspawn.qc b/src/gs-entbase/shared/worldspawn.qc index 5536cf88..ed6f9728 100644 --- a/src/gs-entbase/shared/worldspawn.qc +++ b/src/gs-entbase/shared/worldspawn.qc @@ -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);