mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-26 06:20:16 -04:00
fix P_FindShortestTextureAround (#126)
* fix P_FindShortestTextureAround * fix position of M_PAUSE patch * Revert "fix position of M_PAUSE patch" This reverts commit 0d42ca4755639ca94b22720945f68ecd671dcd92. * add fix for P_FindShortestUpperAround and check for demo version * reformatted * delete blank line
This commit is contained in:
parent
d14c65fe02
commit
70f2a0c2d0
@ -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<<FRACBITS; //jff 3/13/98 prevent overflow in height calcs
|
||||
@ -503,10 +504,10 @@ fixed_t P_FindShortestTextureAround(int secnum)
|
||||
if (twoSided(secnum, i))
|
||||
{
|
||||
const side_t *side;
|
||||
if ((side = getSide(secnum,i,0))->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<<FRACBITS; //jff 3/13/98 prevent overflow
|
||||
@ -540,10 +542,10 @@ fixed_t P_FindShortestUpperAround(int secnum)
|
||||
if (twoSided(secnum, i))
|
||||
{
|
||||
const side_t *side;
|
||||
if ((side = getSide(secnum,i,0))->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];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user