diff --git a/src/d_main.cpp b/src/d_main.cpp index 2029cccb8..c9ad68870 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2964,32 +2964,16 @@ static void CheckForHacks(BuildInfo& buildinfo) } } -static void FixUnityStatusBar() +static void FixWideStatusBar() { - if (gameinfo.flags & GI_FIXUNITYSBAR) + FGameTexture* sbartex = TexMan.FindGameTexture("stbar", ETextureType::MiscPatch); + + // only adjust offsets if none already exist + if (sbartex && sbartex->GetTexelWidth() > 320 && + !sbartex->GetTexelLeftOffset(0) && !sbartex->GetTexelTopOffset(0)) { - FGameTexture* sbartex = TexMan.FindGameTexture("stbar", ETextureType::MiscPatch); - - // texture not found, we're not here to operate on a non-existent texture so just exit - if (!sbartex) - return; - - // where is this texture located? if it's not in an iwad, then exit - int lumpnum = sbartex->GetSourceLump(); - if (lumpnum >= 0 && lumpnum < fileSystem.GetNumEntries()) - { - int wadno = fileSystem.GetFileContainer(lumpnum); - if (!(wadno >= fileSystem.GetIwadNum() && wadno <= fileSystem.GetMaxIwadNum())) - return; - } - - // only adjust offsets if none already exist - if (sbartex->GetTexelWidth() > 320 && - !sbartex->GetTexelLeftOffset(0) && !sbartex->GetTexelTopOffset(0)) - { - sbartex->SetOffsets(0, (sbartex->GetTexelWidth() - 320) / 2, 0); - sbartex->SetOffsets(1, (sbartex->GetTexelWidth() - 320) / 2, 0); - } + sbartex->SetOffsets(0, (sbartex->GetTexelWidth() - 320) / 2, 0); + sbartex->SetOffsets(1, (sbartex->GetTexelWidth() - 320) / 2, 0); } } @@ -3374,7 +3358,7 @@ static int D_DoomMain_Internal (void) TexAnim.Init(); C_InitConback(); - FixUnityStatusBar(); + FixWideStatusBar(); StartScreen->Progress(); V_InitFonts(); diff --git a/wadsrc/static/mapinfo/common.txt b/wadsrc/static/mapinfo/common.txt index 642eaeac8..6a31743b4 100644 --- a/wadsrc/static/mapinfo/common.txt +++ b/wadsrc/static/mapinfo/common.txt @@ -359,7 +359,6 @@ Intermission Inter_Bunny Intermission TheEnd { - // no backgrounds are set here so this will reuse the previous one. Image { Draw = "END0", 108, 68