diff options
author | Carsten Weisse <[email protected]> | 2005-01-17 23:09:41 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-01-17 23:09:41 +0000 |
commit | 2d634ba2305a5f090d305e85b1f999c2572b6416 (patch) | |
tree | 9e3830bc059618a810ce6b7ccaa5ce47b724f86c | |
parent | 375746bb3307d9313d309d510731d3507159ff73 (diff) |
garbage optimized with static buffers
-rw-r--r-- | src/jake2/server/SV_SEND.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jake2/server/SV_SEND.java b/src/jake2/server/SV_SEND.java index ef56246..d1165c2 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.7 2005-01-17 22:00:09 cawe Exp $ +// $Id: SV_SEND.java,v 1.8 2005-01-17 23:09:41 cawe Exp $ package jake2.server; @@ -355,6 +355,7 @@ public class SV_SEND { =============================================================================== */ + private static final sizebuf_t msg = new sizebuf_t(); /* ======================= SV_SendClientDatagram @@ -362,7 +363,6 @@ public class SV_SEND { */ public static boolean SV_SendClientDatagram(client_t client) { //byte msg_buf[] = new byte[Defines.MAX_MSGLEN]; - sizebuf_t msg = new sizebuf_t(); SV_ENTS.SV_BuildClientFrame(client); @@ -445,6 +445,7 @@ public class SV_SEND { } private static final byte msgbuf[] = new byte[Defines.MAX_MSGLEN]; + private static final byte[] NULLBYTE = {0}; /* ======================= SV_SendClientMessages @@ -525,7 +526,7 @@ public class SV_SEND { else { // just update reliable if needed if (c.netchan.message.cursize != 0 || Globals.curtime - c.netchan.last_sent > 1000) - Netchan.Transmit(c.netchan, 0, new byte[0]); + Netchan.Transmit(c.netchan, 0, NULLBYTE); } } } |