From: Rene S. <sa...@us...> - 2005-01-23 21:31:59
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8896/src/jake2/server Modified Files: Tag: RST SV_USER.java SV_SEND.java Log Message: added debug messages, fixed cooperative multiplayer bugs. Index: SV_USER.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_USER.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** SV_USER.java 6 Dec 2004 14:23:04 -0000 1.7 --- SV_USER.java 23 Jan 2005 21:31:50 -0000 1.7.2.1 *************** *** 166,176 **** // send the serverdata ! MSG ! .WriteByte(SV_MAIN.sv_client.netchan.message, Defines.svc_serverdata); MSG.WriteInt(SV_MAIN.sv_client.netchan.message, Defines.PROTOCOL_VERSION); ! MSG ! .WriteLong(SV_MAIN.sv_client.netchan.message, SV_INIT.svs.spawncount); MSG.WriteByte(SV_MAIN.sv_client.netchan.message, --- 166,175 ---- // send the serverdata ! MSG.WriteByte(SV_MAIN.sv_client.netchan.message, Defines.svc_serverdata); MSG.WriteInt(SV_MAIN.sv_client.netchan.message, Defines.PROTOCOL_VERSION); ! ! MSG.WriteLong(SV_MAIN.sv_client.netchan.message, SV_INIT.svs.spawncount); MSG.WriteByte(SV_MAIN.sv_client.netchan.message, *************** *** 207,211 **** "cmd configstrings " + SV_INIT.svs.spawncount + " 0\n"); } ! } --- 206,210 ---- "cmd configstrings " + SV_INIT.svs.spawncount + " 0\n"); } ! } *************** *** 514,517 **** --- 513,518 ---- */ public static void SV_ExecuteUserCommand(String s) { + + Com.dprintln("SV_ExecuteUserCommand:" + s ); SV_USER.ucmd_t u = null; Index: SV_SEND.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_SEND.java,v retrieving revision 1.6 retrieving revision 1.6.6.1 diff -C2 -d -r1.6 -r1.6.6.1 *** SV_SEND.java 22 Sep 2004 19:22:12 -0000 1.6 --- SV_SEND.java 23 Jan 2005 21:31:50 -0000 1.6.6.1 *************** *** 218,221 **** --- 218,223 ---- SZ.Clear(SV_INIT.sv.multicast); } + + private static final float[] origin_v = { 0, 0, 0 }; /* ================== *************** *** 256,260 **** int i; int ent; - float[] origin_v = { 0, 0, 0 }; boolean use_phs; --- 258,261 ---- *************** *** 355,358 **** --- 356,360 ---- */ + private static final sizebuf_t msg = new sizebuf_t(); /* ======================= *************** *** 361,370 **** */ 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); ! SZ.Init(msg, msg_buf, msg_buf.length); msg.allowoverflow = true; --- 363,371 ---- */ public static boolean SV_SendClientDatagram(client_t client) { ! //byte msg_buf[] = new byte[Defines.MAX_MSGLEN]; SV_ENTS.SV_BuildClientFrame(client); ! SZ.Init(msg, msgbuf, msgbuf.length); msg.allowoverflow = true; *************** *** 443,446 **** --- 444,450 ---- return false; } + + private static final byte msgbuf[] = new byte[Defines.MAX_MSGLEN]; + private static final byte[] NULLBYTE = {0}; /* ======================= *************** *** 452,456 **** client_t c; int msglen; - byte msgbuf[] = new byte[Defines.MAX_MSGLEN]; int r; --- 456,459 ---- *************** *** 524,528 **** // 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]); } } --- 527,531 ---- // just update reliable if needed if (c.netchan.message.cursize != 0 || Globals.curtime - c.netchan.last_sent > 1000) ! Netchan.Transmit(c.netchan, 0, NULLBYTE); } } |