From 88f856d995f7b7c891c5528e629a4d394f051545 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 15 Apr 2018 23:51:41 +0200 Subject: [PATCH] - fixed a y/Z mixup with the hardware renderer's vectors. Why do they have to be different from what the game itself uses...? :( --- src/gl/compatibility/gl_20.cpp | 2 +- src/gl/scene/gl_walls_draw.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)