Fix midtexture stepup issue

Thanks Indev!!!!
This commit is contained in:
NepDisk 2024-09-13 15:33:38 -04:00
parent 7277fe1dbf
commit 1593ba7041
4 changed files with 9 additions and 27 deletions

View file

@ -5134,7 +5134,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate
sfx_None, // deathsound
1, // speed
24*FRACUNIT, // radius
16*FRACUNIT, // radius
48*FRACUNIT, // height
0, // display offset
1000, // mass

View file

@ -1614,7 +1614,7 @@ static BlockItReturn_t PIT_CheckLine(line_t *ld)
{
fixed_t textop, texbottom;
P_GetMidtextureTopBottom(ld, tm.x, tm.y,
P_GetMidtextureTopBottom(ld, &open,
&textop, &texbottom);
/* The effect handling is done later but it won't

View file

@ -422,8 +422,7 @@ void P_CameraLineOpening(line_t *linedef, opening_t *open)
boolean
P_GetMidtextureTopBottom
( line_t * linedef,
fixed_t x,
fixed_t y,
opening_t *open,
fixed_t * return_top,
fixed_t * return_bottom)
{
@ -437,23 +436,6 @@ P_GetMidtextureTopBottom
if (!texnum)
return false;
textop = P_GetSectorCeilingZAt(front, x, y);
texbottom = P_GetSectorFloorZAt(front, x, y);
if (back)
{
z = P_GetSectorCeilingZAt(back, x, y);
if (z < textop)
textop = z;
z = P_GetSectorFloorZAt(back, x, y);
if (z > texbottom)
texbottom = z;
}
// Get the midtexture's height
texheight = textures[texnum]->height << FRACBITS;
@ -484,17 +466,17 @@ P_GetMidtextureTopBottom
{
if ((linedef->flags & ML_WRAPMIDTEX) && !side->repeatcnt) // "infinite" repeat
{
texbottom += side->rowoffset;
textop += side->rowoffset;
texbottom = open->floor + side->rowoffset;
textop = open->ceiling + side->rowoffset;
}
else if (linedef->flags & ML_MIDPEG)
{
texbottom += side->rowoffset;
texbottom = open->floor + side->rowoffset;
textop = texbottom + texheight*(side->repeatcnt+1);
}
else
{
textop += side->rowoffset;
textop = open->ceiling + side->rowoffset;
texbottom = textop - texheight*(side->repeatcnt+1);
}
}
@ -633,7 +615,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj, opening_t *open)
fixed_t textop, texbottom;
fixed_t texmid, delta1, delta2;
if (P_GetMidtextureTopBottom(linedef, cross.x, cross.y, &textop, &texbottom))
if (P_GetMidtextureTopBottom(linedef, open, &textop, &texbottom))
{
texmid = texbottom+(textop-texbottom)/2;

View file

@ -72,7 +72,7 @@ void P_SetPrecipitationThingPosition(precipmobj_t *thing);
void P_CreatePrecipSecNodeList(precipmobj_t *thing, fixed_t x,fixed_t y);
void P_HitSpecialLines(mobj_t *thing, fixed_t x, fixed_t y, fixed_t momx, fixed_t momy);
boolean P_GetMidtextureTopBottom(line_t *linedef, fixed_t x, fixed_t y, fixed_t *return_top, fixed_t *return_bottom);
boolean P_GetMidtextureTopBottom(line_t *linedef, opening_t *open, fixed_t *return_top, fixed_t *return_bottom);
typedef enum
{