From: Rene S. <sa...@us...> - 2007-04-15 20:13:08
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2419/src/jake2/qcommon Modified Files: CM.java Netchan.java Log Message: cosmetic Index: Netchan.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Netchan.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Netchan.java 18 Dec 2005 22:10:08 -0000 1.7 --- Netchan.java 15 Apr 2007 20:12:33 -0000 1.8 *************** *** 103,112 **** public static byte net_message_buffer[] = new byte[Defines.MAX_MSGLEN]; ! /* ! * =============== Netchan_Init * - * =============== */ - //ok. public static void Netchan_Init() { long port; --- 103,110 ---- public static byte net_message_buffer[] = new byte[Defines.MAX_MSGLEN]; ! /** ! * Netchan_Init. * */ public static void Netchan_Init() { long port; *************** *** 122,131 **** private static final byte send_buf[] = new byte[Defines.MAX_MSGLEN]; private static final sizebuf_t send = new sizebuf_t(); ! /* ! * =============== Netchan_OutOfBand ! * ! * Sends an out-of-band datagram ================ */ - //ok. public static void Netchan_OutOfBand(int net_socket, netadr_t adr, int length, byte data[]) { --- 120,127 ---- private static final byte send_buf[] = new byte[Defines.MAX_MSGLEN]; private static final sizebuf_t send = new sizebuf_t(); ! ! /** ! * Netchan_OutOfBand. Sends an out-of-band datagram. */ public static void Netchan_OutOfBand(int net_socket, netadr_t adr, int length, byte data[]) { *************** *** 145,156 **** } ! /* ! * ============== Netchan_Setup ! * ! * called to open a channel to a remote system ============== */ public static void Setup(int sock, netchan_t chan, netadr_t adr, int qport) { - //memset (chan, 0, sizeof(*chan)); - chan.clear(); chan.sock = sock; --- 141,148 ---- } ! /** ! * Netchan_Setup is alled to open a channel to a remote system. */ public static void Setup(int sock, netchan_t chan, netadr_t adr, int qport) { chan.clear(); chan.sock = sock; *************** *** 165,172 **** } ! /* ! * =============== Netchan_CanReliable ! * ! * Returns true if the last reliable message has acked ================ */ public static boolean Netchan_CanReliable(netchan_t chan) { --- 157,162 ---- } ! /** ! * Netchan_CanReliable. Returns true if the last reliable message has acked. */ public static boolean Netchan_CanReliable(netchan_t chan) { *************** *** 176,180 **** } ! // das ist richtig !!! public static boolean Netchan_NeedReliable(netchan_t chan) { boolean send_reliable; --- 166,170 ---- } ! public static boolean Netchan_NeedReliable(netchan_t chan) { boolean send_reliable; *************** *** 196,209 **** } ! // private static final byte send_buf[] = new byte[Defines.MAX_MSGLEN]; ! // private static final sizebuf_t send = new sizebuf_t(); ! /* ! * =============== Netchan_Transmit ! * ! * tries to send an unreliable message to a connection, and handles the ! * transmition / retransmition of the reliable messages. * * A 0 length will still generate a packet and deal with the reliable ! * messages. ================ */ public static void Transmit(netchan_t chan, int length, byte data[]) { --- 186,195 ---- } ! /** ! * Netchan_Transmit tries to send an unreliable message to a connection, ! * and handles the transmition / retransmition of the reliable messages. * * A 0 length will still generate a packet and deal with the reliable ! * messages. */ public static void Transmit(netchan_t chan, int length, byte data[]) { *************** *** 264,268 **** if (send_reliable != 0) Com.Printf( - //"send %4i : s=%i reliable=%i ack=%i rack=%i\n" "send " + send.cursize + " : s=" + (chan.outgoing_sequence - 1) + " reliable=" --- 250,253 ---- *************** *** 272,276 **** else Com.Printf( - //"send %4i : s=%i ack=%i rack=%i\n" "send " + send.cursize + " : s=" + (chan.outgoing_sequence - 1) + " ack=" --- 257,260 ---- *************** *** 280,288 **** } ! /* ! * ================= Netchan_Process ! * ! * called when the current net_message is from remote_address modifies ! * net_message so that it points to the packet payload ================= */ public static boolean Process(netchan_t chan, sizebuf_t msg) { --- 264,270 ---- } ! /** ! * Netchan_Process is called when the current net_message is from remote_address modifies ! * net_message so that it points to the packet payload. */ public static boolean Process(netchan_t chan, sizebuf_t msg) { *************** *** 310,314 **** if (reliable_message != 0) Com.Printf( - //"recv %4i : s=%i reliable=%i ack=%i rack=%i\n" "recv " + msg.cursize + " : s=" + sequence + " reliable=" --- 292,295 ---- *************** *** 317,323 **** + reliable_ack + "\n"); else ! Com ! .Printf( ! //"recv %4i : s=%i ack=%i rack=%i\n" "recv " + msg.cursize + " : s=" + sequence + " ack=" + sequence_ack + " rack=" + reliable_ack + "\n"); --- 298,302 ---- + reliable_ack + "\n"); else ! Com.Printf( "recv " + msg.cursize + " : s=" + sequence + " ack=" + sequence_ack + " rack=" + reliable_ack + "\n"); Index: CM.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/CM.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CM.java 4 Dec 2005 21:00:17 -0000 1.12 --- CM.java 15 Apr 2007 20:12:33 -0000 1.13 *************** *** 208,212 **** Com.DPrintf("CM_LoadMap(" + name + ")...\n"); byte buf[]; - int i; qfiles.dheader_t header; int length; --- 208,211 ---- *************** *** 331,343 **** out.headnode = in.headnode; if (debugloadmap) { ! Com ! .DPrintf( ! "|%6i|%8.2f|%8.2f|%8.2f| %8.2f|%8.2f|%8.2f| %8.2f|%8.2f|%8.2f|\n", ! new Vargs().add(out.headnode) ! .add(out.origin[0]).add(out.origin[1]) ! .add(out.origin[2]).add(out.mins[0]) ! .add(out.mins[1]).add(out.mins[2]).add( ! out.maxs[0]).add(out.maxs[1]) ! .add(out.maxs[2])); } } --- 330,339 ---- out.headnode = in.headnode; if (debugloadmap) { ! Com.DPrintf( ! "|%6i|%8.2f|%8.2f|%8.2f| %8.2f|%8.2f|%8.2f| %8.2f|%8.2f|%8.2f|\n", ! new Vargs().add(out.headnode) ! .add(out.origin[0]).add(out.origin[1]).add(out.origin[2]) ! .add(out.mins[0]).add(out.mins[1]).add(out.mins[2]) ! .add(out.maxs[0]).add(out.maxs[1]).add(out.maxs[2])); } } *************** *** 457,464 **** if (debugloadmap) { ! Com ! .DPrintf("| %6i| %6i| %8X|\n", new Vargs().add( ! out.firstbrushside).add(out.numsides).add( ! out.contents)); } } --- 453,459 ---- if (debugloadmap) { ! Com.DPrintf("| %6i| %6i| %8X|\n", new Vargs().add( ! out.firstbrushside).add(out.numsides).add( ! out.contents)); } } *************** *** 1258,1263 **** } ! /* ! * ================ CM_TraceToLeaf ================ */ public static void CM_TraceToLeaf(int leafnum) { --- 1253,1258 ---- } ! /** ! * CM_TraceToLeaf. */ public static void CM_TraceToLeaf(int leafnum) { *************** *** 1513,1521 **** } ! /* ! * ================== CM_TransformedBoxTrace ! * ! * Handles offseting and rotation of the end points for moving and rotating ! * entities ================== */ public static trace_t TransformedBoxTrace(float[] start, float[] end, --- 1508,1514 ---- } ! /** ! * CM_TransformedBoxTrace handles offseting and rotation of the end points for moving and rotating ! * entities. */ public static trace_t TransformedBoxTrace(float[] start, float[] end, *************** *** 1670,1675 **** } ! /* ! * ==================== FloodAreaConnections ==================== */ public static void FloodAreaConnections() { --- 1663,1668 ---- } ! /** ! * FloodAreaConnections. */ public static void FloodAreaConnections() { *************** *** 1696,1701 **** } ! /* ! * ================= CM_SetAreaPortalState ================= */ public static void CM_SetAreaPortalState(int portalnum, boolean open) { --- 1689,1694 ---- } ! /** ! * CM_SetAreaPortalState. */ public static void CM_SetAreaPortalState(int portalnum, boolean open) { *************** *** 1707,1712 **** } ! /* ! * ================= CM_AreasConnected ================= */ --- 1700,1705 ---- } ! /** ! * CM_AreasConnected returns true, if two areas are connected. */ *************** *** 1724,1734 **** } ! /* ! * ================= CM_WriteAreaBits ! * ! * Writes a length byte followed by a bit vector of all the areas that area * in the same flood as the area parameter * ! * This is used by the client refreshes to cull visibility ================= */ public static int CM_WriteAreaBits(byte buffer[], int area) { --- 1717,1725 ---- } ! /** ! * CM_WriteAreaBits writes a length byte followed by a bit vector of all the areas that area * in the same flood as the area parameter * ! * This is used by the client refreshes to cull visibility. */ public static int CM_WriteAreaBits(byte buffer[], int area) { *************** *** 1739,1743 **** bytes = (numareas + 7) >> 3; ! if (map_noareas.value != 0) { // for debugging, send everything Arrays.fill(buffer, 0, bytes, (byte) 255); } else { --- 1730,1735 ---- bytes = (numareas + 7) >> 3; ! if (map_noareas.value != 0) { ! // for debugging, send everything Arrays.fill(buffer, 0, bytes, (byte) 255); } else { *************** *** 1753,1767 **** } ! /* ! * =================== CM_WritePortalState ! * ! * Writes the portal state to a savegame file =================== */ public static void CM_WritePortalState(RandomAccessFile os) { - //was: fwrite(portalopen, sizeof(portalopen), 1, f); try { - for (int n = 0; n < portalopen.length; n++) if (portalopen[n]) --- 1745,1755 ---- } ! /** ! * CM_WritePortalState writes the portal state to a savegame file. */ public static void CM_WritePortalState(RandomAccessFile os) { try { for (int n = 0; n < portalopen.length; n++) if (portalopen[n]) *************** *** 1775,1783 **** } ! /* ! * =================== CM_ReadPortalState ! * ! * Reads the portal state from a savegame file and recalculates the area ! * connections =================== */ public static void CM_ReadPortalState(RandomAccessFile f) { --- 1763,1769 ---- } ! /** ! * CM_ReadPortalState reads the portal state from a savegame file and recalculates the area ! * connections. */ public static void CM_ReadPortalState(RandomAccessFile f) { *************** *** 1799,1807 **** } ! /* ! * ============= CM_HeadnodeVisible ! * ! * Returns true if any leaf under headnode has a cluster that is potentially ! * visible ============= */ public static boolean CM_HeadnodeVisible(int nodenum, byte visbits[]) { --- 1785,1791 ---- } ! /** ! * CM_HeadnodeVisible returns true if any leaf under headnode has a cluster that is potentially ! * visible. */ public static boolean CM_HeadnodeVisible(int nodenum, byte visbits[]) { |