mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- fixed: The crosshair setting code checked for existence of lumps, not textures and missed anything defined in a TEXTURES lump.
This commit is contained in:
parent
109da206a6
commit
a0f507d18f
1 changed files with 7 additions and 6 deletions
|
@ -146,7 +146,6 @@ void ST_LoadCrosshair(bool alwaysload)
|
||||||
{
|
{
|
||||||
int num = 0;
|
int num = 0;
|
||||||
char name[16], size;
|
char name[16], size;
|
||||||
int lump;
|
|
||||||
|
|
||||||
if (!crosshairforce &&
|
if (!crosshairforce &&
|
||||||
players[consoleplayer].camera != NULL &&
|
players[consoleplayer].camera != NULL &&
|
||||||
|
@ -179,18 +178,20 @@ void ST_LoadCrosshair(bool alwaysload)
|
||||||
num = -num;
|
num = -num;
|
||||||
}
|
}
|
||||||
size = (SCREENWIDTH < 640) ? 'S' : 'B';
|
size = (SCREENWIDTH < 640) ? 'S' : 'B';
|
||||||
|
|
||||||
mysnprintf (name, countof(name), "XHAIR%c%d", size, num);
|
mysnprintf (name, countof(name), "XHAIR%c%d", size, num);
|
||||||
if ((lump = Wads.CheckNumForName (name, ns_graphics)) == -1)
|
FTextureID texid = TexMan.CheckForTexture(name, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ShortNameOnly);
|
||||||
|
if (!texid.isValid())
|
||||||
{
|
{
|
||||||
mysnprintf (name, countof(name), "XHAIR%c1", size);
|
mysnprintf (name, countof(name), "XHAIR%c1", size);
|
||||||
if ((lump = Wads.CheckNumForName (name, ns_graphics)) == -1)
|
texid = TexMan.CheckForTexture(name, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ShortNameOnly);
|
||||||
|
if (!texid.isValid())
|
||||||
{
|
{
|
||||||
strcpy (name, "XHAIRS1");
|
texid = TexMan.CheckForTexture("XHAIRS1", FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ShortNameOnly);
|
||||||
}
|
}
|
||||||
num = 1;
|
|
||||||
}
|
}
|
||||||
CrosshairNum = num;
|
CrosshairNum = num;
|
||||||
CrosshairImage = TexMan[TexMan.CheckForTexture(name, FTexture::TEX_MiscPatch)];
|
CrosshairImage = TexMan[texid];
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue