aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render/jogl/Light.java
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2004-07-08 20:56:55 +0000
committerHolger Zickner <[email protected]>2004-07-08 20:56:55 +0000
commit6b36f9e0380b7c80aecdc78ef07a0cf473712416 (patch)
tree4a378b960321b3b7b07ef2effac295d0dd589eab /src/jake2/render/jogl/Light.java
parent252832999fa43bce63ca4b643fab5d9dd51fccc4 (diff)
import of Jake2 version v_0_9
Diffstat (limited to 'src/jake2/render/jogl/Light.java')
-rw-r--r--src/jake2/render/jogl/Light.java18
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;