aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2/game')
-rw-r--r--src/jake2/game/client_persistant_t.java17
-rw-r--r--src/jake2/game/client_respawn_t.java7
-rw-r--r--src/jake2/game/game_locals_t.java5
-rw-r--r--src/jake2/game/trace_t.java19
4 files changed, 12 insertions, 36 deletions
diff --git a/src/jake2/game/client_persistant_t.java b/src/jake2/game/client_persistant_t.java
index 5014d3b..774cfa4 100644
--- a/src/jake2/game/client_persistant_t.java
+++ b/src/jake2/game/client_persistant_t.java
@@ -19,26 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST.
-// $Id: client_persistant_t.java,v 1.3 2004-07-08 20:24:29 hzi Exp $
+// $Id: client_persistant_t.java,v 1.4 2004-07-12 20:47:01 hzi Exp $
package jake2.game;
import jake2.Defines;
import jake2.util.Lib;
-import java.io.IOException;
import java.nio.ByteBuffer;
-public class client_persistant_t implements Cloneable {
-
-// public client_persistant_t getClone() {
-// try {
-// return (client_persistant_t) this.clone();
-// }
-// catch (CloneNotSupportedException e) {
-// return null;
-// }
-// }
+public class client_persistant_t {
public void set(client_persistant_t from)
{
@@ -51,7 +41,6 @@ public class client_persistant_t implements Cloneable {
savedFlags = from.savedFlags;
selected_item = from.selected_item;
System.arraycopy(from.inventory, 0, inventory, 0, inventory.length);
- //inventory = Lib.clone(from.inventory);
max_bullets = from.max_bullets;
max_shells = from.max_shells;
max_rockets = from.max_rockets;
@@ -100,7 +89,7 @@ public class client_persistant_t implements Cloneable {
int helpchanged;
boolean spectator; // client is a spectator
- public void load(ByteBuffer bb) throws IOException {
+ public void load(ByteBuffer bb) {
// client persistant_t
userinfo = Lib.readString(bb, Defines.MAX_INFO_STRING);
diff --git a/src/jake2/game/client_respawn_t.java b/src/jake2/game/client_respawn_t.java
index a2ed8d5..722d609 100644
--- a/src/jake2/game/client_respawn_t.java
+++ b/src/jake2/game/client_respawn_t.java
@@ -18,12 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST.
-// $Id: client_respawn_t.java,v 1.3 2004-07-08 20:24:29 hzi Exp $
+// $Id: client_respawn_t.java,v 1.4 2004-07-12 20:47:01 hzi Exp $
package jake2.game;
import jake2.qcommon.Com;
import jake2.util.Lib;
+import jake2.util.Math3D;
import java.io.IOException;
import java.nio.ByteBuffer;
@@ -42,7 +43,7 @@ public class client_respawn_t
coop_respawn.set(from.coop_respawn);
enterframe = from.enterframe;
score = from.score;
- cmd_angles = Lib.clone(from.cmd_angles);
+ Math3D.VectorCopy(from.cmd_angles, cmd_angles);
spectator = from.spectator;
}
@@ -52,7 +53,7 @@ public class client_respawn_t
coop_respawn = new client_persistant_t();
enterframe = 0;
score = 0;
- cmd_angles = new float[3];
+ Math3D.VectorClear(cmd_angles);
spectator = false;
}
diff --git a/src/jake2/game/game_locals_t.java b/src/jake2/game/game_locals_t.java
index 3a04445..e638195 100644
--- a/src/jake2/game/game_locals_t.java
+++ b/src/jake2/game/game_locals_t.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST.
-// $Id: game_locals_t.java,v 1.2 2004-07-08 15:58:44 hzi Exp $
+// $Id: game_locals_t.java,v 1.3 2004-07-12 20:47:01 hzi Exp $
package jake2.game;
@@ -27,7 +27,6 @@ import jake2.Defines;
import jake2.qcommon.Com;
import jake2.util.Lib;
-import java.io.IOException;
import java.nio.ByteBuffer;
public class game_locals_t extends Defines
@@ -60,7 +59,7 @@ public class game_locals_t extends Defines
public int num_items;
public boolean autosaved;
- public void load(ByteBuffer bb) throws IOException
+ public void load(ByteBuffer bb)
{
String date = Lib.readString(bb, 16);
diff --git a/src/jake2/game/trace_t.java b/src/jake2/game/trace_t.java
index ac6d413..420a344 100644
--- a/src/jake2/game/trace_t.java
+++ b/src/jake2/game/trace_t.java
@@ -19,11 +19,11 @@ 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.3 2004-07-08 20:24:29 hzi Exp $
+// $Id: trace_t.java,v 1.4 2004-07-12 20:47:01 hzi Exp $
package jake2.game;
-import jake2.util.Lib;
+import jake2.util.Math3D;
//a trace is returned when a box is swept through the world
public class trace_t implements Cloneable {
@@ -44,23 +44,10 @@ public class trace_t implements Cloneable {
allsolid = from.allsolid;
startsolid = from.allsolid;
fraction = from.fraction;
- endpos = Lib.clone(from.endpos);
+ Math3D.VectorCopy(from.endpos, endpos);
plane.set(from.plane);
surface = from.surface;
contents = from.contents;
ent = from.ent;
}
-
- // =============
-// public trace_t getClone() {
-// trace_t out = null;
-// try {
-// out = (trace_t) this.clone();
-// out.plane = plane.getClone();
-// out.endpos = Lib.clone(endpos);
-// }
-// catch (CloneNotSupportedException e) {
-// }
-// return out;
-// }
}