diff --git a/src/r_bsp.c b/src/r_bsp.c index de4de9dff..c41dd0851 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -915,6 +915,7 @@ static void R_Subsector(size_t num) #ifdef ESLOPE , frontsector->f_slope #endif + , frontsector->floor_scalex ); } else @@ -937,6 +938,7 @@ static void R_Subsector(size_t num) #ifdef ESLOPE , frontsector->c_slope #endif + , frontsector->ceiling_scalex ); } else @@ -998,6 +1000,7 @@ static void R_Subsector(size_t num) #ifdef ESLOPE , *rover->b_slope #endif + , frontsector->floor_scalex ); #ifdef ESLOPE @@ -1044,6 +1047,7 @@ static void R_Subsector(size_t num) #ifdef ESLOPE , *rover->t_slope #endif + , frontsector->ceiling_scalex ); #ifdef ESLOPE @@ -1094,6 +1098,7 @@ static void R_Subsector(size_t num) #ifdef ESLOPE , NULL // will ffloors be slopable eventually? #endif + , polysec->floor_scalex ); ffloor[numffloors].height = polysec->floorheight; @@ -1122,6 +1127,7 @@ static void R_Subsector(size_t num) #ifdef ESLOPE , NULL // will ffloors be slopable eventually? #endif + , polysec->ceiling_scalex ); ffloor[numffloors].polyobj = po; diff --git a/src/r_plane.c b/src/r_plane.c index f96e7950e..621fd4941 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -322,6 +322,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, #ifdef ESLOPE , pslope_t *slope #endif + , fixed_t scale ) { visplane_t *check; @@ -390,6 +391,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, #ifdef ESLOPE && check->slope == slope #endif + && check->scale == scale ) { return check; @@ -405,6 +407,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, check->maxx = -1; check->xoffs = xoff; check->yoffs = yoff; + check->scale = scale; check->extra_colormap = planecolormap; check->ffloor = pfloor; check->viewx = viewx; @@ -490,6 +493,7 @@ visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop) #ifdef ESLOPE new_pl->slope = pl->slope; #endif + new_pl->scale = pl->scale; pl = new_pl; pl->minx = start; pl->maxx = stop; @@ -989,9 +993,9 @@ void R_DrawSinglePlane(visplane_t *pl) viewangle = pl->viewangle+pl->plangle; } - xoffs = pl->xoffs; - yoffs = pl->yoffs; - planeheight = abs(pl->height - pl->viewz); + xoffs = FixedMul(pl->scale, pl->xoffs); + yoffs = FixedMul(pl->scale, pl->yoffs); + planeheight = FixedMul(pl->scale, abs(pl->height - pl->viewz)); currentplane = pl; levelflat = &levelflats[pl->picnum]; diff --git a/src/r_plane.h b/src/r_plane.h index d9ba5c56b..717720796 100644 --- a/src/r_plane.h +++ b/src/r_plane.h @@ -46,6 +46,8 @@ typedef struct visplane_s fixed_t xoffs, yoffs; // Scrolling flats. + fixed_t scale; // Scale. + struct ffloor_s *ffloor; #ifdef POLYOBJECTS_PLANES polyobj_t *polyobj; @@ -89,6 +91,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, fixed_t #ifdef ESLOPE , pslope_t *slope #endif + , fixed_t scale ); visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop); void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop);