mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Make solid midtexture trick work properly(?) for polyobjects
This commit is contained in:
parent
808775de02
commit
70732f6475
1 changed files with 19 additions and 6 deletions
|
@ -531,12 +531,25 @@ void P_LineOpening(line_t *linedef)
|
||||||
texheight = textures[texturetranslation[side->midtexture]]->height << FRACBITS;
|
texheight = textures[texturetranslation[side->midtexture]]->height << FRACBITS;
|
||||||
|
|
||||||
// Set texbottom and textop to the Z coordinates of the texture's boundaries
|
// Set texbottom and textop to the Z coordinates of the texture's boundaries
|
||||||
if (linedef->flags & ML_DONTPEGBOTTOM) {
|
#ifdef POLYOBJECTS
|
||||||
texbottom = openbottom + side->rowoffset;
|
if (linedef->polyobj && (linedef->polyobj->flags & POF_TESTHEIGHT)) {
|
||||||
textop = texbottom + texheight*(side->repeatcnt+1);
|
if (linedef->flags & ML_DONTPEGBOTTOM) {
|
||||||
} else {
|
texbottom = back->floorheight + side->rowoffset;
|
||||||
textop = opentop - side->rowoffset;
|
textop = texbottom + texheight*(side->repeatcnt+1);
|
||||||
texbottom = textop - texheight*(side->repeatcnt+1);
|
} else {
|
||||||
|
textop = back->ceilingheight - side->rowoffset;
|
||||||
|
texbottom = textop - texheight*(side->repeatcnt+1);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
if (linedef->flags & ML_DONTPEGBOTTOM) {
|
||||||
|
texbottom = openbottom + side->rowoffset;
|
||||||
|
textop = texbottom + texheight*(side->repeatcnt+1);
|
||||||
|
} else {
|
||||||
|
textop = opentop - side->rowoffset;
|
||||||
|
texbottom = textop - texheight*(side->repeatcnt+1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
texmid = texbottom+(textop-texbottom)/2;
|
texmid = texbottom+(textop-texbottom)/2;
|
||||||
|
|
Loading…
Reference in a new issue