diff --git a/Source/p_spec.c b/Source/p_spec.c index b961929a..42ac408f 100644 --- a/Source/p_spec.c +++ b/Source/p_spec.c @@ -495,6 +495,7 @@ fixed_t P_FindShortestTextureAround(int secnum) { const sector_t *sec = §ors[secnum]; int i, minsize = D_MAXINT; + int mintex = (demo_version < 203) ? 1 : 0; //jff 8/14/98 texture 0 is a placeholder if (!comp[comp_model]) minsize = 32000<bottomtexture >= 0 && + if ((side = getSide(secnum,i,0))->bottomtexture >= mintex && textureheight[side->bottomtexture] < minsize) minsize = textureheight[side->bottomtexture]; - if ((side = getSide(secnum,i,1))->bottomtexture >= 0 && + if ((side = getSide(secnum,i,1))->bottomtexture >= mintex && textureheight[side->bottomtexture] < minsize) minsize = textureheight[side->bottomtexture]; } @@ -531,6 +532,7 @@ fixed_t P_FindShortestUpperAround(int secnum) { const sector_t *sec = §ors[secnum]; int i, minsize = D_MAXINT; + int mintex = (demo_version < 203) ? 1 : 0; //jff 8/14/98 texture 0 is a placeholder if (!comp[comp_model]) minsize = 32000<toptexture >= 0) + if ((side = getSide(secnum,i,0))->toptexture >= mintex) if (textureheight[side->toptexture] < minsize) minsize = textureheight[side->toptexture]; - if ((side = getSide(secnum,i,1))->toptexture >= 0) + if ((side = getSide(secnum,i,1))->toptexture >= mintex) if (textureheight[side->toptexture] < minsize) minsize = textureheight[side->toptexture]; }