aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/game/trace_t.java
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2005-01-14 16:14:02 +0000
committerCarsten Weisse <[email protected]>2005-01-14 16:14:02 +0000
commitf81da5f4ecebb9ef5c283389b41c0a72889f64ae (patch)
tree4fc0e60bf3d3fdb3decdac08d876f8822fdaedc2 /src/jake2/game/trace_t.java
parentcff7dca2b76c9a5e18fc72c28665f8b918b2e9cc (diff)
clear() added
Diffstat (limited to 'src/jake2/game/trace_t.java')
-rw-r--r--src/jake2/game/trace_t.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/jake2/game/trace_t.java b/src/jake2/game/trace_t.java
index 420a344..358e6f4 100644
--- a/src/jake2/game/trace_t.java
+++ b/src/jake2/game/trace_t.java
@@ -19,14 +19,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST.
-// $Id: trace_t.java,v 1.4 2004-07-12 20:47:01 hzi Exp $
+// $Id: trace_t.java,v 1.5 2005-01-14 16:09:42 cawe Exp $
package jake2.game;
import jake2.util.Math3D;
//a trace is returned when a box is swept through the world
-public class trace_t implements Cloneable {
+public class trace_t {
public boolean allsolid; // if true, plane is not valid
public boolean startsolid; // if true, the initial point was in a solid area
public float fraction; // time completed, 1.0 = didn't hit anything
@@ -38,9 +38,8 @@ public class trace_t implements Cloneable {
public int contents; // contents on other side of surface hit
// pointer
public edict_t ent; // not set by CM_*() functions
-
- public void set(trace_t from)
- {
+
+ public void set(trace_t from) {
allsolid = from.allsolid;
startsolid = from.allsolid;
fraction = from.fraction;
@@ -50,4 +49,15 @@ public class trace_t implements Cloneable {
contents = from.contents;
ent = from.ent;
}
+
+ public void clear() {
+ allsolid = false;
+ startsolid = false;
+ fraction = 0;
+ Math3D.VectorClear(endpos);
+ plane.clear();
+ surface = null;
+ contents = 0;
+ ent = null;
+ }
}