aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/server
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2005-01-17 22:00:09 +0000
committerCarsten Weisse <[email protected]>2005-01-17 22:00:09 +0000
commit5eaa2dd8bd5697ecf71d7eed12aa5921b33fcaeb (patch)
tree0a046fee687b6209fe34791a75c775d9f8e3d24b /src/jake2/server
parent042f0a2c752194f36f9edbb46b9921e5daf881ee (diff)
garbage optimized with static buffer and float[]
Diffstat (limited to 'src/jake2/server')
-rw-r--r--src/jake2/server/SV_SEND.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/jake2/server/SV_SEND.java b/src/jake2/server/SV_SEND.java
index 8488954..ef56246 100644
--- a/src/jake2/server/SV_SEND.java
+++ b/src/jake2/server/SV_SEND.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 17.01.2004 by RST.
-// $Id: SV_SEND.java,v 1.6 2004-09-22 19:22:12 salomo Exp $
+// $Id: SV_SEND.java,v 1.7 2005-01-17 22:00:09 cawe Exp $
package jake2.server;
@@ -217,6 +217,8 @@ public class SV_SEND {
SZ.Clear(SV_INIT.sv.multicast);
}
+
+ private static final float[] origin_v = { 0, 0, 0 };
/*
==================
SV_StartSound
@@ -255,7 +257,6 @@ public class SV_SEND {
int flags;
int i;
int ent;
- float[] origin_v = { 0, 0, 0 };
boolean use_phs;
if (volume < 0 || volume > 1.0)
@@ -360,12 +361,12 @@ public class SV_SEND {
=======================
*/
public static boolean SV_SendClientDatagram(client_t client) {
- byte msg_buf[] = new byte[Defines.MAX_MSGLEN];
+ //byte msg_buf[] = new byte[Defines.MAX_MSGLEN];
sizebuf_t msg = new sizebuf_t();
SV_ENTS.SV_BuildClientFrame(client);
- SZ.Init(msg, msg_buf, msg_buf.length);
+ SZ.Init(msg, msgbuf, msgbuf.length);
msg.allowoverflow = true;
// send over all the relevant entity_state_t
@@ -442,6 +443,8 @@ public class SV_SEND {
return false;
}
+
+ private static final byte msgbuf[] = new byte[Defines.MAX_MSGLEN];
/*
=======================
SV_SendClientMessages
@@ -451,7 +454,6 @@ public class SV_SEND {
int i;
client_t c;
int msglen;
- byte msgbuf[] = new byte[Defines.MAX_MSGLEN];
int r;
msglen = 0;