From 6cb035b7b2c88a1fbd1870dd8d979f56cb90f4f4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 22 Apr 2022 00:53:27 +0200 Subject: [PATCH] =?UTF-8?q?-=20added=20workaround=20to=20Dehacked=20so=20t?= =?UTF-8?q?hat=20=E2=80=9EDoom=E2=80=9C=20only=20replaces=20the=20music=20?= =?UTF-8?q?name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Of all these short strings this is the only one that occurs elsewhere as well. --- src/gamedata/d_dehacked.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gamedata/d_dehacked.cpp b/src/gamedata/d_dehacked.cpp index 99cba80b4..f15a4b5a7 100644 --- a/src/gamedata/d_dehacked.cpp +++ b/src/gamedata/d_dehacked.cpp @@ -2753,7 +2753,17 @@ static int PatchText (int oldSize) // Search through most other texts const char *str; - do + + // hackhack: If the given string is "Doom", only replace "MUSIC_DOOM". + // This is the only music or texture name clashing with common words in the string table. + if (!stricmp(oldStr, "Doom")) + { + str = "MUSIC_DOOM"; + TableElement te = { LumpFileNum, { newStrData, newStrData, newStrData, newStrData } }; + DehStrings.Insert(str, te); + good = true; + } + else do { oldStrData.MergeChars(' '); str = EnglishStrings.MatchString(oldStr);