diff --git a/src/r_segs.c b/src/r_segs.c
index 3171bced67db27c5777fd034665be589a0d41833..d656108f61d50f45aa7bedd529ee29abc0f480b4 100644
--- a/src/r_segs.c
+++ b/src/r_segs.c
@@ -1352,7 +1352,7 @@ static void R_RenderSegLoop (void)
 			for (i = 0; i < dc_numlights; i++)
 			{
 				dc_lightlist[i].height += dc_lightlist[i].heightstep;
-				if (dc_lightlist[i].flags & FF_SOLID)
+				if (dc_lightlist[i].flags & FF_CUTSOLIDS)
 					dc_lightlist[i].botheight += dc_lightlist[i].botheightstep;
 			}
 		}
@@ -2001,7 +2001,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
 			rlight->heightstep = -FixedMul (rw_scalestep, (light->height - viewz) >> 4);
 			rlight->flags = light->flags;
 
-			if (light->caster && light->caster->flags & FF_SOLID)
+			if (light->caster && light->caster->flags & FF_CUTSOLIDS)
 			{
 				rlight->botheight = (centeryfrac >> 4) - FixedMul((*light->caster->bottomheight - viewz) >> 4, rw_scale);
 				rlight->botheightstep = -FixedMul (rw_scalestep, (*light->caster->bottomheight - viewz) >> 4);