diff --git a/src/gl/compatibility/gl_20.cpp b/src/gl/compatibility/gl_20.cpp index da1d698ba..367a627d2 100644 --- a/src/gl/compatibility/gl_20.cpp +++ b/src/gl/compatibility/gl_20.cpp @@ -747,7 +747,7 @@ bool GLWall::PrepareLight(ADynamicLight * light, int pass) float scale; auto normal = glseg.Normal(); - p.Set(normal, -normal.X * glseg.x1 - normal.Y * glseg.y1); + p.Set(normal, -normal.X * glseg.x1 - normal.Z * glseg.y1); if (!p.ValidNormal()) { diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index 0fb2e38bf..a71053217 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -73,7 +73,7 @@ void GLWall::SetupLights() lightdata.Clear(); auto normal = glseg.Normal(); - p.Set(normal, -normal.X * glseg.x1 - normal.Y * glseg.y1); + p.Set(normal, -normal.X * glseg.x1 - normal.Z * glseg.y1); FLightNode *node; if (seg->sidedef == NULL)