- fixed background setup for intermissions to apply tiling only where intended.

This commit is contained in:
Christoph Oelckers 2022-11-08 20:49:39 +01:00
parent 37da5268e1
commit c39b7c7c7b

View file

@ -282,13 +282,21 @@ bool DInterBackground::LoadBackground(bool isenterpic)
texture.SetInvalid();
level_info_t* li = FindLevelInfo(wbs->current);
if (li != nullptr) exitpic = li->ExitPic;
if (li != nullptr)
{
exitpic = li->ExitPic;
if (li->ExitPic.IsNotEmpty()) tilebackground = false;
}
lumpname = exitpic;
if (isenterpic)
{
level_info_t* li = FindLevelInfo(wbs->next);
if (li != NULL) lumpname = li->EnterPic;
if (li != NULL)
{
lumpname = li->EnterPic;
if (li->EnterPic.IsNotEmpty()) tilebackground = false;
}
}
// Try to get a default if nothing specified
@ -306,6 +314,7 @@ bool DInterBackground::LoadBackground(bool isenterpic)
{
mysnprintf(buffer, countof(buffer), "$IN_EPI%c", levelname[1]);
lumpname = buffer;
tilebackground = false;
}
}
if (!lumpname)
@ -340,6 +349,7 @@ bool DInterBackground::LoadBackground(bool isenterpic)
{
mysnprintf(buffer, countof(buffer), "$IN_HTC%c", wbs->next[1]);
lumpname = buffer;
tilebackground = false;
}
}
if (!lumpname)