- fixed: FFlatVertex contained two unused members.

- fixed: Clearing the args in the VavoomLightColor constructor only cleared 5 bytes, still assuming byte args.
This commit is contained in:
Christoph Oelckers 2013-12-05 10:23:01 +01:00
parent 7ba0f2467a
commit 058f065446
3 changed files with 3 additions and 3 deletions

View file

@ -128,7 +128,7 @@ void FFlatVertex::SetFlatVertex(vertex_t *vt, const secplane_t & plane)
z = plane.ZatPoint(vt->fx, vt->fy); z = plane.ZatPoint(vt->fx, vt->fy);
u = vt->fx/64.f; u = vt->fx/64.f;
v = -vt->fy/64.f; v = -vt->fy/64.f;
w = dc = df = 0; w = /*dc = df =*/ 0;
} }
//========================================================================== //==========================================================================

View file

@ -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 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 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); void SetFlatVertex(vertex_t *vt, const secplane_t &plane);
}; };

View file

@ -107,7 +107,7 @@ void AVavoomLightColor::BeginPlay ()
{ {
int l_args[5]; int l_args[5];
memcpy(l_args, args, sizeof(l_args)); memcpy(l_args, args, sizeof(l_args));
memset(args, 0, 5); memset(args, 0, sizeof(args));
m_intensity[0] = l_args[0] * 4; m_intensity[0] = l_args[0] * 4;
args[LIGHT_RED] = l_args[1] >> 1; args[LIGHT_RED] = l_args[1] >> 1;
args[LIGHT_GREEN] = l_args[2] >> 1; args[LIGHT_GREEN] = l_args[2] >> 1;