- fix misc light surfaces not working outside their own subsector

This commit is contained in:
Magnus Norddahl 2018-10-30 00:59:10 +01:00
parent 8958790fed
commit 6459b10724
3 changed files with 4 additions and 5 deletions

View file

@ -509,6 +509,7 @@ void kexLightmapBuilder::TraceSurface(surface_t *surface)
(surface->lightmapSteps[1] * (float)i);
kexVec3 c = LightTexelSample(trace, pos, surface);
kexMath::Clamp(c, 0, 1);
// if nothing at all was traced and color is completely black
// then this surface will not go through the extra rendering

View file

@ -417,7 +417,6 @@ bool kexLightSurface::TraceSurface(FLevel *doomMap, kexTrace &trace, const surfa
curDist = 1.0f - d / distance;
if (curDist < 0.0f) curDist = 0.0f;
/*
if(curDist >= 1)
{
curDist = 1;
@ -445,7 +444,6 @@ bool kexLightSurface::TraceSurface(FLevel *doomMap, kexTrace &trace, const surfa
curDist *= angle;
}
}
*/
if(curDist > *dist)
{

View file

@ -564,11 +564,11 @@ void FLevel::ParseConfigFile(const char *file)
surfaceLightDef surfaceLight;
surfaceLight.tag = 0;
surfaceLight.outerCone = 1.0f;
surfaceLight.innerCone = 0;
surfaceLight.outerCone = 0.0f;
surfaceLight.innerCone = 0.0f;
surfaceLight.falloff = 1.0f;
surfaceLight.intensity = 1.0f;
surfaceLight.distance = 1000.0f;
surfaceLight.distance = 400.0f;
surfaceLight.bIgnoreCeiling = false;
surfaceLight.bIgnoreFloor = false;
surfaceLight.bNoCenterPoint = false;