From b88a37949e2ff162b06d603797049d95b7e1f338 Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Sat, 9 Nov 2019 00:08:22 -0300 Subject: [PATCH] Use REDFLR for missing flats --- src/p_setup.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/p_setup.c b/src/p_setup.c index bf1c7b0f4..2c5305499 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -606,11 +606,18 @@ Ploadflat (levelflat_t *levelflat, const char *flatname) { if (( texturenum = R_CheckTextureNumForName(flatname) ) == -1) { - /* we can handle REDWALL later */ + // check for REDWALL + if (( texturenum = R_CheckTextureNumForName("REDWALL") ) != -1) + goto texturefound; + // check for REDFLR + else if (( flatnum = R_GetFlatNumForName("REDFLR") ) != LUMPERROR) + goto flatfound; + // nevermind levelflat->type = LEVELFLAT_NONE; } else { +texturefound: levelflat->type = LEVELFLAT_TEXTURE; levelflat->u.texture. num = texturenum; levelflat->u.texture.lastnum = texturenum; @@ -620,6 +627,7 @@ Ploadflat (levelflat_t *levelflat, const char *flatname) } else { +flatfound: /* This could be a flat, patch, or PNG. */ if (R_CheckIfPatch(flatnum)) levelflat->type = LEVELFLAT_PATCH;