- fixed some texture priorititing problems with Hexen's player displays for the menu. The patches for these should not be placed in the TEX_WallPatch namespace because it's not what modders might expect from them.

SVN r2841 (trunk)
This commit is contained in:
Christoph Oelckers 2010-09-21 16:50:09 +00:00
commit 385cfc5698
2 changed files with 39 additions and 30 deletions

View file

@ -189,7 +189,7 @@ protected:
private:
void CheckForHacks ();
void ParsePatch(FScanner &sc, TexPart & part, bool silent);
void ParsePatch(FScanner &sc, TexPart & part, bool silent, int usetype);
};
//==========================================================================
@ -970,12 +970,12 @@ void FTextureManager::AddTexturesLumps (int lump1, int lump2, int patcheslump)
//
//==========================================================================
void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part, bool silent)
void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part, bool silent, int usetype)
{
FString patchname;
sc.MustGetString();
FTextureID texno = TexMan.CheckForTexture(sc.String, TEX_WallPatch);
FTextureID texno = TexMan.CheckForTexture(sc.String, usetype);
int Mirror = 0;
if (!texno.isValid())
@ -996,10 +996,10 @@ void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part, bool silent)
}
else if (strlen(sc.String) <= 8 && !strpbrk(sc.String, "./"))
{
int lumpnum = Wads.CheckNumForName(sc.String, ns_patches);
int lumpnum = Wads.CheckNumForName(sc.String, usetype == TEX_MiscPatch? ns_graphics : ns_patches);
if (lumpnum >= 0)
{
part.Texture = FTexture::CreateTexture(lumpnum, TEX_WallPatch);
part.Texture = FTexture::CreateTexture(lumpnum, usetype);
TexMan.AddTexture(part.Texture);
}
}
@ -1252,7 +1252,15 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
else if (sc.Compare("Patch"))
{
TexPart part;
ParsePatch(sc, part, bSilent);
ParsePatch(sc, part, bSilent, TEX_WallPatch);
if (part.Texture != NULL) parts.Push(part);
part.Texture = NULL;
part.Translation = NULL;
}
else if (sc.Compare("Graphic"))
{
TexPart part;
ParsePatch(sc, part, bSilent, TEX_MiscPatch);
if (part.Texture != NULL) parts.Push(part);
part.Texture = NULL;
part.Translation = NULL;