diff options
Diffstat (limited to 'src/jake2/render/jogl/Light.java')
-rw-r--r-- | src/jake2/render/jogl/Light.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/jake2/render/jogl/Light.java b/src/jake2/render/jogl/Light.java index 214641d..686884a 100644 --- a/src/jake2/render/jogl/Light.java +++ b/src/jake2/render/jogl/Light.java @@ -2,7 +2,7 @@ * Light.java * Copyright (C) 2003 * - * $Id: Light.java,v 1.2 2004-07-08 20:24:30 hzi Exp $ + * $Id: Light.java,v 1.3 2004-07-08 20:56:55 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -146,6 +146,7 @@ public abstract class Light extends Warp { float dist; msurface_t surf; int i; + int sidebit; if (node.contents != -1) return; @@ -167,7 +168,22 @@ public abstract class Light extends Warp { // mark the polygons for (i=0 ; i<node.numsurfaces ; i++) { + surf = r_worldmodel.surfaces[node.firstsurface + i]; + + /* + * cwei + * bugfix for dlight behind the walls + */ + dist = Math3D.DotProduct (light.origin, surf.plane.normal) - surf.plane.dist; + sidebit = (dist >= 0) ? 0 : Defines.SURF_PLANEBACK; + if ( (surf.flags & Defines.SURF_PLANEBACK) != sidebit ) + continue; + /* + * cwei + * bugfix end + */ + if (surf.dlightframe != r_dlightframecount) { surf.dlightbits = 0; |