aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render/jogl/Surf.java
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2004-07-12 18:19:42 +0000
committerHolger Zickner <[email protected]>2004-07-12 18:19:42 +0000
commit25252922d19cd51c8bf7a3544d6b2a82c8a26fff (patch)
tree835dadfe0cbef07877d042d60125c8b00962a806 /src/jake2/render/jogl/Surf.java
parentbc2f86047f0bc0fdd4cb18b6904b7aa8612a20f3 (diff)
fix nullpointer exception when first starting with:
r_drawworld 0 r_drawentities 0
Diffstat (limited to 'src/jake2/render/jogl/Surf.java')
-rw-r--r--src/jake2/render/jogl/Surf.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/jake2/render/jogl/Surf.java b/src/jake2/render/jogl/Surf.java
index 54e0e77..e4d0101 100644
--- a/src/jake2/render/jogl/Surf.java
+++ b/src/jake2/render/jogl/Surf.java
@@ -2,7 +2,7 @@
* Surf.java
* Copyright (C) 2003
*
- * $Id: Surf.java,v 1.3 2004-07-09 06:50:48 hzi Exp $
+ * $Id: Surf.java,v 1.4 2004-07-12 18:19:42 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -1204,7 +1204,10 @@ public abstract class Surf extends Draw {
void R_DrawWorld()
{
entity_t ent = new entity_t();
-
+ // auto cycle the world frame for texture animation
+ ent.frame = (int)(r_newrefdef.time*2);
+ currententity = ent;
+
if (r_drawworld.value == 0)
return;
@@ -1215,11 +1218,6 @@ public abstract class Surf extends Draw {
Math3D.VectorCopy(r_newrefdef.vieworg, modelorg);
- // auto cycle the world frame for texture animation
- // memset (&ent, 0, sizeof(ent));
- ent.frame = (int)(r_newrefdef.time*2);
- currententity = ent;
-
gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1;
gl.glColor3f (1,1,1);