From 058f06544680d7114657364c893862a4dee8f012 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 5 Dec 2013 10:23:01 +0100 Subject: [PATCH] - fixed: FFlatVertex contained two unused members. - fixed: Clearing the args in the VavoomLightColor constructor only cleared 5 bytes, still assuming byte args. --- src/gl/data/gl_vertexbuffer.cpp | 2 +- src/gl/data/gl_vertexbuffer.h | 2 +- src/gl/dynlights/a_dynlight.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gl/data/gl_vertexbuffer.cpp b/src/gl/data/gl_vertexbuffer.cpp index cda619ce1..93802f74b 100644 --- a/src/gl/data/gl_vertexbuffer.cpp +++ b/src/gl/data/gl_vertexbuffer.cpp @@ -128,7 +128,7 @@ void FFlatVertex::SetFlatVertex(vertex_t *vt, const secplane_t & plane) z = plane.ZatPoint(vt->fx, vt->fy); u = vt->fx/64.f; v = -vt->fy/64.f; - w = dc = df = 0; + w = /*dc = df =*/ 0; } //========================================================================== diff --git a/src/gl/data/gl_vertexbuffer.h b/src/gl/data/gl_vertexbuffer.h index 6c2b83a15..49db1c7db 100644 --- a/src/gl/data/gl_vertexbuffer.h +++ b/src/gl/data/gl_vertexbuffer.h @@ -24,7 +24,7 @@ struct FFlatVertex // exactly 32 bytes large { float x,z,y,w; // w only for padding to make one vertex 32 bytes - maybe it will find some use later float u,v; // texture coordinates - float dc, df; // distance to floor and ceiling on walls - used for glowing + //float dc, df; // distance to floor and ceiling on walls - used for glowing void SetFlatVertex(vertex_t *vt, const secplane_t &plane); }; diff --git a/src/gl/dynlights/a_dynlight.cpp b/src/gl/dynlights/a_dynlight.cpp index 80dc4e543..bc12288cd 100644 --- a/src/gl/dynlights/a_dynlight.cpp +++ b/src/gl/dynlights/a_dynlight.cpp @@ -107,7 +107,7 @@ void AVavoomLightColor::BeginPlay () { int l_args[5]; memcpy(l_args, args, sizeof(l_args)); - memset(args, 0, 5); + memset(args, 0, sizeof(args)); m_intensity[0] = l_args[0] * 4; args[LIGHT_RED] = l_args[1] >> 1; args[LIGHT_GREEN] = l_args[2] >> 1;