Merge branch 'master' of github.com:fabiangreffrath/woof

This commit is contained in:
Fabian Greffrath 2024-03-01 14:25:08 +01:00
commit 9aa4ddd7f8
3 changed files with 13 additions and 4 deletions

View File

@ -1048,11 +1048,10 @@ void R_InitData(void)
int R_FlatNumForName(const char *name) // killough -- const added
{
int i = (W_CheckNumForName)(name, ns_flats);
if (i == -1)
if (i == NO_TEXTURE)
{
// [FG] render missing flats as SKY
I_Printf(VB_WARNING, "R_FlatNumForName: %.8s not found", name);
return skyflatnum;
return i;
}
return i - firstflat;
}
@ -1124,7 +1123,12 @@ void R_PrecacheLevel(void)
memset(hitlist, 0, numflats);
for (i = numsectors; --i >= 0; )
hitlist[sectors[i].floorpic] = hitlist[sectors[i].ceilingpic] = 1;
{
if (sectors[i].floorpic > NO_TEXTURE)
hitlist[sectors[i].floorpic] = 1;
if (sectors[i].ceilingpic > NO_TEXTURE)
hitlist[sectors[i].ceilingpic] = 1;
}
for (i = numflats; --i >= 0; )
if (hitlist[i])

View File

@ -41,6 +41,8 @@ struct mobj_s;
#define MAXDRAWSEGS 256
#define NO_TEXTURE (-1)
//
// INTERNAL MAP TYPES
// used by play and refresh

View File

@ -304,6 +304,9 @@ visplane_t *R_FindPlane(fixed_t height, int picnum, int lightlevel,
visplane_t *check;
unsigned hash; // killough
if (picnum == NO_TEXTURE)
return NULL;
if (picnum == skyflatnum || picnum & PL_SKYFLAT) // killough 10/98
{
lightlevel = 0; // killough 7/19/98: most skies map together