mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Fix #1193
This commit is contained in:
parent
2747e30f8c
commit
6e109be076
2 changed files with 4 additions and 9 deletions
|
@ -823,18 +823,13 @@ void HWR_GetRawFlat(lumpnum_t flatlumpnum)
|
|||
|
||||
void HWR_GetLevelFlat(levelflat_t *levelflat)
|
||||
{
|
||||
if (levelflat->type == LEVELFLAT_NONE)
|
||||
if (levelflat->type == LEVELFLAT_NONE || levelflat->texture_id < 0)
|
||||
{
|
||||
HWR_SetCurrentTexture(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
INT32 texturenum = texturetranslation[levelflat->texture_id];
|
||||
if (texturenum <= 0)
|
||||
{
|
||||
HWR_SetCurrentTexture(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
GLMapTexture_t *grtex = &gl_flats[texturenum];
|
||||
GLMipmap_t *grMipmap = &grtex->mipmap;
|
||||
|
|
|
@ -585,17 +585,17 @@ Ploadflat (levelflat_t *levelflat, const char *flatname, boolean resize)
|
|||
|
||||
// Look for a flat
|
||||
int texturenum = R_CheckFlatNumForName(levelflat->name);
|
||||
if (texturenum <= 0)
|
||||
if (texturenum < 0)
|
||||
{
|
||||
// If we can't find a flat, try looking for a texture!
|
||||
texturenum = R_CheckTextureNumForName(levelflat->name);
|
||||
if (texturenum <= 0)
|
||||
if (texturenum < 0)
|
||||
{
|
||||
// Use "not found" texture
|
||||
texturenum = R_CheckTextureNumForName("REDWALL");
|
||||
|
||||
// Give up?
|
||||
if (texturenum <= 0)
|
||||
if (texturenum < 0)
|
||||
{
|
||||
levelflat->type = LEVELFLAT_NONE;
|
||||
texturenum = -1;
|
||||
|
|
Loading…
Reference in a new issue