aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render
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
parent252832999fa43bce63ca4b643fab5d9dd51fccc4 (diff)
import of Jake2 version v_0_9
Diffstat (limited to 'src/jake2/render')
-rw-r--r--src/jake2/render/jogl/Impl.java9
-rw-r--r--src/jake2/render/jogl/Light.java18
2 files changed, 22 insertions, 5 deletions
diff --git a/src/jake2/render/jogl/Impl.java b/src/jake2/render/jogl/Impl.java
index ba8b929..991c349 100644
--- a/src/jake2/render/jogl/Impl.java
+++ b/src/jake2/render/jogl/Impl.java
@@ -2,7 +2,7 @@
* Impl.java
* Copyright (C) 2003
*
- * $Id: Impl.java,v 1.3 2004-07-08 20:24:30 hzi Exp $
+ * $Id: Impl.java,v 1.4 2004-07-08 20:56:55 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -27,7 +27,10 @@ package jake2.render.jogl;
import jake2.Defines;
import jake2.Globals;
+import jake2.client.CL;
+import jake2.qcommon.Com;
import jake2.qcommon.xcommand_t;
+import jake2.server.SV;
import jake2.sys.KBD;
import java.awt.Dimension;
@@ -126,9 +129,7 @@ public class Impl extends Misc implements GLEventListener {
// register event listener
window.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
- R_Shutdown();
- System.out.println("Received event " + e.paramString() + ", exiting...\n");
- System.exit(0);
+ ri.Cmd_ExecuteText(Defines.EXEC_APPEND, "quit");
}
});
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;