diff --git a/src/swrenderer/line/r_line.cpp b/src/swrenderer/line/r_line.cpp index 5679b8e50..9398611cf 100644 --- a/src/swrenderer/line/r_line.cpp +++ b/src/swrenderer/line/r_line.cpp @@ -940,7 +940,7 @@ namespace swrenderer { wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, frontsector->lightlevel) + r_actualextralight); - GlobVis = r_WallVisibility; + double GlobVis = r_WallVisibility; rw_lightleft = float(GlobVis / WallC.sz1); rw_lightstep = float((GlobVis / WallC.sz2 - rw_lightleft) / (WallC.sx2 - WallC.sx1)); } diff --git a/src/swrenderer/plane/r_flatplane.h b/src/swrenderer/plane/r_flatplane.h index c72b6402b..bd830f63b 100644 --- a/src/swrenderer/plane/r_flatplane.h +++ b/src/swrenderer/plane/r_flatplane.h @@ -33,6 +33,7 @@ namespace swrenderer double planeheight; bool plane_shade; int planeshade; + double GlobVis; fixed_t pviewx, pviewy; fixed_t xscale, yscale; double xstepscale, ystepscale; diff --git a/src/swrenderer/scene/r_light.cpp b/src/swrenderer/scene/r_light.cpp index e5cfb3f4f..7a45d9377 100644 --- a/src/swrenderer/scene/r_light.cpp +++ b/src/swrenderer/scene/r_light.cpp @@ -45,8 +45,6 @@ namespace swrenderer double r_SpriteVisibility; double r_ParticleVisibility; - double GlobVis; - FDynamicColormap *basecolormap; // [RH] colormap currently drawing with int fixedlightlev; FSWColormap *fixedcolormap; diff --git a/src/swrenderer/scene/r_light.h b/src/swrenderer/scene/r_light.h index eab64f094..e39b63067 100644 --- a/src/swrenderer/scene/r_light.h +++ b/src/swrenderer/scene/r_light.h @@ -57,8 +57,6 @@ namespace swrenderer extern float r_TiltVisibility; extern double r_SpriteVisibility; - extern double GlobVis; - extern int r_actualextralight; extern bool foggy; extern int fixedlightlev; diff --git a/src/swrenderer/things/r_wallsprite.cpp b/src/swrenderer/things/r_wallsprite.cpp index 2d1455a1a..e55b0fcc5 100644 --- a/src/swrenderer/things/r_wallsprite.cpp +++ b/src/swrenderer/things/r_wallsprite.cpp @@ -175,7 +175,7 @@ namespace swrenderer } int shade = LIGHT2SHADE(spr->sector->lightlevel + r_actualextralight); - GlobVis = r_WallVisibility; + double GlobVis = r_WallVisibility; float lightleft = float(GlobVis / spr->wallc.sz1); float lightstep = float((GlobVis / spr->wallc.sz2 - lightleft) / (spr->wallc.sx2 - spr->wallc.sx1)); float light = lightleft + (x1 - spr->wallc.sx1) * lightstep;