Fix various issues/crashes with texture alignments
This commit is contained in:
parent
1b9180111c
commit
7e13cb8b47
|
@ -1378,7 +1378,7 @@ static void R_RenderSegLoop (void)
|
||||||
maskedtexturecol[rw_x] = (INT16)texturecolumn;
|
maskedtexturecol[rw_x] = (INT16)texturecolumn;
|
||||||
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
if (maskedtexture) {
|
if (maskedtextureheight != NULL) {
|
||||||
maskedtextureheight[rw_x] = (curline->linedef->flags & ML_DONTPEGBOTTOM ?
|
maskedtextureheight[rw_x] = (curline->linedef->flags & ML_DONTPEGBOTTOM ?
|
||||||
max(rw_midtexturemid, rw_midtextureback) :
|
max(rw_midtexturemid, rw_midtextureback) :
|
||||||
min(rw_midtexturemid, rw_midtextureback));
|
min(rw_midtexturemid, rw_midtextureback));
|
||||||
|
@ -1447,6 +1447,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
#endif
|
#endif
|
||||||
static size_t maxdrawsegs = 0;
|
static size_t maxdrawsegs = 0;
|
||||||
|
|
||||||
|
maskedtextureheight = NULL;
|
||||||
|
|
||||||
if (ds_p == drawsegs+maxdrawsegs)
|
if (ds_p == drawsegs+maxdrawsegs)
|
||||||
{
|
{
|
||||||
size_t pos = ds_p - drawsegs;
|
size_t pos = ds_p - drawsegs;
|
||||||
|
@ -1969,7 +1971,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
{
|
{
|
||||||
// bottom of texture at bottom
|
// bottom of texture at bottom
|
||||||
// top of texture at top
|
// top of texture at top
|
||||||
rw_bottomtexturemid = worldtop;
|
rw_bottomtexturemid = worldbottom;
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
rw_bottomtextureslide = floorfrontslide;
|
rw_bottomtextureslide = floorfrontslide;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2159,6 +2161,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
rw_midtextureback = worldhigh;
|
rw_midtextureback = worldhigh;
|
||||||
rw_midtexturebackslide = ceilingbackslide;
|
rw_midtexturebackslide = ceilingbackslide;
|
||||||
}
|
}
|
||||||
|
rw_midtexturemid += sidedef->rowoffset;
|
||||||
|
rw_midtextureback += sidedef->rowoffset;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
maskedtexture = true;
|
maskedtexture = true;
|
||||||
|
|
Loading…
Reference in New Issue