You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(52) |
Aug
(34) |
Sep
(99) |
Oct
(110) |
Nov
(21) |
Dec
(69) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(117) |
Feb
(90) |
Mar
(1) |
Apr
(22) |
May
(96) |
Jun
(25) |
Jul
(22) |
Aug
|
Sep
|
Oct
(18) |
Nov
(43) |
Dec
(71) |
2006 |
Jan
(20) |
Feb
(10) |
Mar
|
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(60) |
Nov
(63) |
Dec
(35) |
2007 |
Jan
(18) |
Feb
(40) |
Mar
(14) |
Apr
(18) |
May
(33) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
(25) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Holger Z. <hz...@us...> - 2004-10-19 12:08:34
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10710 Modified Files: Tag: jogl-11 .cvsignore build_patch.xml Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/jake2/jake2/.cvsignore,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** .cvsignore 8 Jul 2004 20:56:47 -0000 1.3 --- .cvsignore 19 Oct 2004 12:08:18 -0000 1.3.4.1 *************** *** 4,5 **** --- 4,7 ---- *.tar.gz *.zip + *.map + *.jar Index: build_patch.xml =================================================================== RCS file: /cvsroot/jake2/jake2/Attic/build_patch.xml,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** build_patch.xml 19 Oct 2004 09:28:18 -0000 1.1.2.2 --- build_patch.xml 19 Oct 2004 12:08:18 -0000 1.1.2.3 *************** *** 19,23 **** <pathelement location="lib/jogl/jogl.jar"/> <pathelement location="lib/joal/linux/joal.jar"/> ! <pathelement location="${dist}/lib/jake2.jar"/> </path> --- 19,23 ---- <pathelement location="lib/jogl/jogl.jar"/> <pathelement location="lib/joal/linux/joal.jar"/> ! <pathelement location="jake2.jar"/> </path> *************** *** 56,61 **** </jar> <proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2-patch.jar" ! defaultpackage="" overloadaggressively="off" applymapping="jake2.map"> <injar name="${dist}/lib/jake-patch.jar"/> <libraryjar name="lib/jogl/jogl.jar"/> <libraryjar name="lib/joal/linux/joal.jar"/> --- 56,62 ---- </jar> <proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2-patch.jar" ! defaultpackage="" overloadaggressively="off" applymapping="jake2.map" shrink="false"> <injar name="${dist}/lib/jake-patch.jar"/> + <libraryjar name="jake2.jar"/> <libraryjar name="lib/jogl/jogl.jar"/> <libraryjar name="lib/joal/linux/joal.jar"/> *************** *** 88,97 **** <!-- distclean --> <target name="distclean" depends="clean"> - <delete dir="${dist}"/> - <delete dir="webstart/lib"/> <delete> ! <fileset dir="."> ! <include name="*.tar.gz"/> ! <include name="*.zip"/> </fileset> </delete> --- 89,95 ---- <!-- distclean --> <target name="distclean" depends="clean"> <delete> ! <fileset dir="webstart/lib"> ! <include name="jake2-patch.jar"/> </fileset> </delete> |
From: Holger Z. <hz...@us...> - 2004-10-19 12:08:14
|
Update of /cvsroot/jake2/jake2/webstart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10642/webstart Modified Files: Tag: jogl-11 jake2_jogl11.jnlp jake2_jogl11ATI.jnlp Log Message: specify main jar Index: jake2_jogl11ATI.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_jogl11ATI.jnlp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** jake2_jogl11ATI.jnlp 19 Oct 2004 09:46:30 -0000 1.1.2.1 --- jake2_jogl11ATI.jnlp 19 Oct 2004 12:08:06 -0000 1.1.2.2 *************** *** 20,24 **** <j2se version="1.4+" max-heap-size="128M"/> <jar href="http://jake2.sourceforge.net/lib/jake2-patch.jar"/> ! <jar href="http://jake2.sourceforge.net/lib/jake2.jar"/> <property name="sun.java2d.noddraw" value="true"/> <property name="ATI_WORKAROUND" value="true"/> --- 20,24 ---- <j2se version="1.4+" max-heap-size="128M"/> <jar href="http://jake2.sourceforge.net/lib/jake2-patch.jar"/> ! <jar href="http://jake2.sourceforge.net/lib/jake2.jar" main="true"/> <property name="sun.java2d.noddraw" value="true"/> <property name="ATI_WORKAROUND" value="true"/> Index: jake2_jogl11.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_jogl11.jnlp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** jake2_jogl11.jnlp 19 Oct 2004 09:46:30 -0000 1.1.2.1 --- jake2_jogl11.jnlp 19 Oct 2004 12:08:06 -0000 1.1.2.2 *************** *** 20,24 **** <j2se version="1.4+" max-heap-size="128M"/> <jar href="http://jake2.sourceforge.net/lib/jake2-patch.jar"/> ! <jar href="http://jake2.sourceforge.net/lib/jake2.jar"/> <property name="sun.java2d.noddraw" value="true"/> <property name="ATI_WORKAROUND" value="false"/> --- 20,24 ---- <j2se version="1.4+" max-heap-size="128M"/> <jar href="http://jake2.sourceforge.net/lib/jake2-patch.jar"/> ! <jar href="http://jake2.sourceforge.net/lib/jake2.jar" main="true"/> <property name="sun.java2d.noddraw" value="true"/> <property name="ATI_WORKAROUND" value="false"/> |
From: Holger Z. <hz...@us...> - 2004-10-19 09:46:42
|
Update of /cvsroot/jake2/jake2/webstart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9382/webstart Modified Files: Tag: jogl-11 jake2_jogl11.jnlp jake2_jogl11ATI.jnlp Log Message: add patch jar in jogl-1.1 webstart files Index: jake2_jogl11ATI.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_jogl11ATI.jnlp,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** jake2_jogl11ATI.jnlp 21 Sep 2004 13:30:09 -0000 1.1 --- jake2_jogl11ATI.jnlp 19 Oct 2004 09:46:30 -0000 1.1.2.1 *************** *** 19,22 **** --- 19,23 ---- <resources> <j2se version="1.4+" max-heap-size="128M"/> + <jar href="http://jake2.sourceforge.net/lib/jake2-patch.jar"/> <jar href="http://jake2.sourceforge.net/lib/jake2.jar"/> <property name="sun.java2d.noddraw" value="true"/> Index: jake2_jogl11.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_jogl11.jnlp,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** jake2_jogl11.jnlp 21 Sep 2004 13:30:09 -0000 1.1 --- jake2_jogl11.jnlp 19 Oct 2004 09:46:30 -0000 1.1.2.1 *************** *** 19,22 **** --- 19,23 ---- <resources> <j2se version="1.4+" max-heap-size="128M"/> + <jar href="http://jake2.sourceforge.net/lib/jake2-patch.jar"/> <jar href="http://jake2.sourceforge.net/lib/jake2.jar"/> <property name="sun.java2d.noddraw" value="true"/> |
From: Holger Z. <hz...@us...> - 2004-10-19 09:34:58
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6580 Modified Files: build.xml Log Message: keep unobfuscated jar for building patches Index: build.xml =================================================================== RCS file: /cvsroot/jake2/jake2/build.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** build.xml 19 Oct 2004 08:50:09 -0000 1.11 --- build.xml 19 Oct 2004 09:34:47 -0000 1.12 *************** *** 109,118 **** <!-- jar --> <target name="jar" depends="compile,copyres"> ! <jar destfile="${dist}/lib/jake.jar" basedir="${build}"> <include name="**"/> </jar> <proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar" defaultpackage="" overloadaggressively="off" printmapping="jake2.map"> ! <injar name="${dist}/lib/jake.jar"/> <libraryjar name="lib/jogl/jogl.jar"/> <libraryjar name="lib/joal/linux/joal.jar"/> --- 109,118 ---- <!-- jar --> <target name="jar" depends="compile,copyres"> ! <jar destfile="jake2.jar" basedir="${build}"> <include name="**"/> </jar> <proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar" defaultpackage="" overloadaggressively="off" printmapping="jake2.map"> ! <injar name="jake2.jar"/> <libraryjar name="lib/jogl/jogl.jar"/> <libraryjar name="lib/joal/linux/joal.jar"/> *************** *** 122,126 **** </keep> </proguard> - <delete file="${dist}/lib/jake.jar"/> </target> --- 122,125 ---- *************** *** 228,231 **** --- 227,231 ---- <include name="*.zip"/> <include name="*.map"/> + <include name="*.jar"/> </fileset> </delete> |
From: Holger Z. <hz...@us...> - 2004-10-19 09:34:33
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6458 Modified Files: .cvsignore Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/jake2/jake2/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 8 Jul 2004 20:56:47 -0000 1.3 --- .cvsignore 19 Oct 2004 09:34:15 -0000 1.4 *************** *** 4,5 **** --- 4,7 ---- *.tar.gz *.zip + *.jar + *.map |
From: Holger Z. <hz...@us...> - 2004-10-19 09:28:30
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5311 Modified Files: Tag: jogl-11 build_patch.xml Log Message: proguard requires the <keep/> tag Index: build_patch.xml =================================================================== RCS file: /cvsroot/jake2/jake2/Attic/build_patch.xml,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** build_patch.xml 19 Oct 2004 09:04:17 -0000 1.1.2.1 --- build_patch.xml 19 Oct 2004 09:28:18 -0000 1.1.2.2 *************** *** 51,55 **** <!-- jar --> ! <target name="jar" depends="compile,copyres"> <jar destfile="${dist}/lib/jake-patch.jar" basedir="${build}"> <include name="**"/> --- 51,55 ---- <!-- jar --> ! <target name="jar" depends="compile"> <jar destfile="${dist}/lib/jake-patch.jar" basedir="${build}"> <include name="**"/> *************** *** 61,64 **** --- 61,65 ---- <libraryjar name="lib/joal/linux/joal.jar"/> <libraryjar name="${java.home}/lib/rt.jar"/> + <keep/> </proguard> <delete file="${dist}/lib/jake-patch.jar"/> |
From: Holger Z. <hz...@us...> - 2004-10-19 09:04:25
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv498 Added Files: Tag: jogl-11 build_patch.xml Log Message: build file for the patch --- NEW FILE: build_patch.xml --- <!-- Buildfile --> <project name="jake2-patch" default="usage" basedir="."> <taskdef name="proguard" classname="proguard.ant.ProGuardTask"> <classpath> <pathelement location="lib/proguard/proguard.jar"/> </classpath> </taskdef> <!-- properties --> <property name="version" value="cvs"/> <property name="src" location="src"/> <property name="test" location="test"/> <property name="build" location="build"/> <property name="dist" location="dist"/> <!-- different classpaths --> <path id="build.class.path"> <pathelement location="lib/jogl/jogl.jar"/> <pathelement location="lib/joal/linux/joal.jar"/> <pathelement location="${dist}/lib/jake2.jar"/> </path> <!-- usage --> <target name="usage"> <echo message="command line arguments for build.sh or build.bat"/> <echo message=""/> <echo message="bindist build only binary distribution"/> <echo message="srcdist build only source distribution"/> <echo message="all build source and binary distribution"/> <echo message="clean delete classfiles keep jake2*.tar.gz and jake2*.zip"/> <echo message="distclean delete all generated files"/> <echo message="jar build only dist/lib/jake2.jar"/> <echo message=""/> </target> <!-- initialize directories --> <target name="init"> <mkdir dir="${build}"/> <mkdir dir="${dist}/lib"/> </target> <!-- compile --> <target name="compile" depends="init"> <javac destdir="${build}" optimize="on" debug="off" source="1.4"> <src path="${src}"/> <include name="jake2/render/JoglBase.java"/> <classpath refid="build.class.path"/> </javac> </target> <!-- jar --> <target name="jar" depends="compile,copyres"> <jar destfile="${dist}/lib/jake-patch.jar" basedir="${build}"> <include name="**"/> </jar> <proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2-patch.jar" defaultpackage="" overloadaggressively="off" applymapping="jake2.map"> <injar name="${dist}/lib/jake-patch.jar"/> <libraryjar name="lib/jogl/jogl.jar"/> <libraryjar name="lib/joal/linux/joal.jar"/> <libraryjar name="${java.home}/lib/rt.jar"/> </proguard> <delete file="${dist}/lib/jake-patch.jar"/> </target> <!-- webstart --> <target name="webstart" depends="jar"> <mkdir dir="webstart/lib"/> <copy todir="webstart/lib"> <fileset dir="${dist}/lib"> <include name="**/jake2-patch.jar"/> </fileset> </copy> <signjar keystore="${user.home}/bytonic" alias="hoz" storepass="${bytonic.pass}"> <fileset dir="webstart/lib"> <include name="**/jake2-patch.jar"/> </fileset> </signjar> </target> <!-- clean --> <target name="clean"> <delete dir="${build}"/> </target> <!-- distclean --> <target name="distclean" depends="clean"> <delete dir="${dist}"/> <delete dir="webstart/lib"/> <delete> <fileset dir="."> <include name="*.tar.gz"/> <include name="*.zip"/> </fileset> </delete> </target> </project> |
From: Holger Z. <hz...@us...> - 2004-10-19 08:50:25
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29780 Modified Files: build.xml Log Message: produce map file when obfuscating Index: build.xml =================================================================== RCS file: /cvsroot/jake2/jake2/build.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** build.xml 19 Sep 2004 12:49:45 -0000 1.10 --- build.xml 19 Oct 2004 08:50:09 -0000 1.11 *************** *** 113,117 **** </jar> <proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar" ! defaultpackage="" overloadaggressively="off"> <injar name="${dist}/lib/jake.jar"/> <libraryjar name="lib/jogl/jogl.jar"/> --- 113,117 ---- </jar> <proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar" ! defaultpackage="" overloadaggressively="off" printmapping="jake2.map"> <injar name="${dist}/lib/jake.jar"/> <libraryjar name="lib/jogl/jogl.jar"/> *************** *** 227,230 **** --- 227,231 ---- <include name="*.tar.gz"/> <include name="*.zip"/> + <include name="*.map"/> </fileset> </delete> |
From: Holger Z. <hz...@us...> - 2004-10-19 07:37:51
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15808/src/jake2/render Modified Files: Tag: jogl-11 JoglBase.java Log Message: do swapBuffers manually Index: JoglBase.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglBase.java,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** JoglBase.java 19 Sep 2004 20:32:05 -0000 1.9 --- JoglBase.java 19 Oct 2004 07:37:42 -0000 1.9.2.1 *************** *** 207,213 **** canvas.setNoAutoRedrawMode(true); ! // TODO this and a new JOGL-release solves the flickering bug (Loading) ! // change also GLimp_EndFrame() ! // canvas.setAutoSwapBufferMode(false); canvas.addGLEventListener(this); --- 207,211 ---- canvas.setNoAutoRedrawMode(true); ! canvas.setAutoSwapBufferMode(false); canvas.addGLEventListener(this); *************** *** 303,308 **** gl.glFlush(); // swap buffer ! // TODO this and a new JOGL-release solves the flickering bug (Loading) ! // canvas.swapBuffers(); } protected void GLimp_BeginFrame(float camera_separation) { --- 301,305 ---- gl.glFlush(); // swap buffer ! canvas.swapBuffers(); } protected void GLimp_BeginFrame(float camera_separation) { |
From: Holger Z. <hz...@us...> - 2004-10-19 07:27:42
|
Update of /cvsroot/jake2/jake2/lib/jogl/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13560/lib/jogl/windows Modified Files: Tag: jogl-11 jogl.dll jogl_cg.dll Log Message: jogl-1.1b05 Index: jogl_cg.dll =================================================================== RCS file: /cvsroot/jake2/jake2/lib/jogl/windows/jogl_cg.dll,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 Binary files /tmp/cvsn3zzGp and /tmp/cvsdUbQys differ Index: jogl.dll =================================================================== RCS file: /cvsroot/jake2/jake2/lib/jogl/windows/jogl.dll,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 Binary files /tmp/cvsla7WJw and /tmp/cvsfepBKz differ |
From: Holger Z. <hz...@us...> - 2004-10-19 07:27:19
|
Update of /cvsroot/jake2/jake2/lib/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13560/lib/jogl Modified Files: Tag: jogl-11 jogl.jar Log Message: jogl-1.1b05 Index: jogl.jar =================================================================== RCS file: /cvsroot/jake2/jake2/lib/jogl/jogl.jar,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 Binary files /tmp/cvscVcUtj and /tmp/cvs2YbGj4 differ |
From: Holger Z. <hz...@us...> - 2004-10-19 07:27:18
|
Update of /cvsroot/jake2/jake2/lib/jogl/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13560/lib/jogl/linux Modified Files: Tag: jogl-11 libjogl.so libjogl_cg.so Log Message: jogl-1.1b05 Index: libjogl.so =================================================================== RCS file: /cvsroot/jake2/jake2/lib/jogl/linux/libjogl.so,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 Binary files /tmp/cvsYYT3m8 and /tmp/cvsUTyePQ differ Index: libjogl_cg.so =================================================================== RCS file: /cvsroot/jake2/jake2/lib/jogl/linux/libjogl_cg.so,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 Binary files /tmp/cvsy5Yru6 and /tmp/cvs3KKnzP differ |
From: Carsten W. <ca...@us...> - 2004-10-18 19:46:04
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12650/src/jake2/qcommon Modified Files: FS.java Log Message: reformat (java conventions) Index: FS.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/FS.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FS.java 21 Sep 2004 10:46:07 -0000 1.7 --- FS.java 18 Oct 2004 19:45:54 -0000 1.8 *************** *** 6,27 **** */ /* ! Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, [...1658 lines suppressed...] ! // char *start; ! searchpath_t s; ! ! if (who == 1) // xatrix ! ch = 'x'; ! else if (who == 2) ! ch = 'r'; ! ! for (s = fs_searchpaths; s != null; s = s.next) { ! if (s.filename.indexOf("xatrix") != -1) ! return 1; ! ! if (s.filename.indexOf("rogue") != -1) ! return 2; ! } ! ! return 0; ! } ! } \ No newline at end of file |
From: Carsten W. <ca...@us...> - 2004-10-17 21:31:42
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20259/src/jake2/qcommon Modified Files: Qcommon.java Log Message: NET methods refactored (name cleanup) Index: Qcommon.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Qcommon.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Qcommon.java 19 Sep 2004 20:53:07 -0000 1.9 --- Qcommon.java 17 Oct 2004 21:31:33 -0000 1.10 *************** *** 113,117 **** Jake2.Q2Dialog.setStatus("initializing network subsystem..."); ! NET.NET_Init(); //ok Netchan.Netchan_Init(); //ok --- 113,117 ---- Jake2.Q2Dialog.setStatus("initializing network subsystem..."); ! NET.Init(); //ok Netchan.Netchan_Init(); //ok |
From: Carsten W. <ca...@us...> - 2004-10-17 21:31:42
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20259/src/jake2/sys Modified Files: NET.java Log Message: NET methods refactored (name cleanup) Index: NET.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/NET.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NET.java 17 Oct 2004 20:33:17 -0000 1.4 --- NET.java 17 Oct 2004 21:31:32 -0000 1.5 *************** *** 83,87 **** * Compares without the port =================== */ ! public static boolean NET_CompareBaseAdr(netadr_t a, netadr_t b) { if (a.type != b.type) return false; --- 83,87 ---- * Compares without the port =================== */ ! public static boolean CompareBaseAdr(netadr_t a, netadr_t b) { if (a.type != b.type) return false; *************** *** 102,106 **** } ! public static String NET_BaseAdrToString(netadr_t a) { return "" + (a.ip[0] & 0xff) + "." + (a.ip[1] & 0xff) + "." + (a.ip[2] & 0xff) + "." + (a.ip[3] & 0xff); --- 102,106 ---- } ! public static String BaseAdrToString(netadr_t a) { return "" + (a.ip[0] & 0xff) + "." + (a.ip[1] & 0xff) + "." + (a.ip[2] & 0xff) + "." + (a.ip[3] & 0xff); *************** *** 138,142 **** */ ! public static boolean NET_GetLoopPacket(int sock, netadr_t net_from, sizebuf_t net_message) { loopback_t loop; --- 138,142 ---- */ ! public static boolean GetLoopPacket(int sock, netadr_t net_from, sizebuf_t net_message) { loopback_t loop; *************** *** 160,164 **** } ! public static void NET_SendLoopPacket(int sock, int length, byte[] data, netadr_t to) { int i; --- 160,164 ---- } ! public static void SendLoopPacket(int sock, int length, byte[] data, netadr_t to) { int i; *************** *** 179,183 **** sizebuf_t net_message) { ! if (NET_GetLoopPacket(sock, net_from, net_message)) { return true; } --- 179,183 ---- sizebuf_t net_message) { ! if (GetLoopPacket(sock, net_from, net_message)) { return true; } *************** *** 222,226 **** public static void SendPacket(int sock, int length, byte[] data, netadr_t to) { if (to.type == Defines.NA_LOOPBACK) { ! NET_SendLoopPacket(sock, length, data, to); return; } --- 222,226 ---- public static void SendPacket(int sock, int length, byte[] data, netadr_t to) { if (to.type == Defines.NA_LOOPBACK) { ! SendLoopPacket(sock, length, data, to); return; } *************** *** 250,254 **** * ==================== NET_OpenIP ==================== */ ! public static void NET_OpenIP() { cvar_t port, ip; --- 250,254 ---- * ==================== NET_OpenIP ==================== */ ! public static void OpenIP() { cvar_t port, ip; *************** *** 257,265 **** if (ip_sockets[Defines.NS_SERVER] == null) ! ip_sockets[Defines.NS_SERVER] = NET_Socket(Defines.NS_SERVER, ip.string, (int) port.value); if (ip_sockets[Defines.NS_CLIENT] == null) ! ip_sockets[Defines.NS_CLIENT] = NET_Socket(Defines.NS_CLIENT, ip.string, Defines.PORT_ANY); } --- 257,265 ---- if (ip_sockets[Defines.NS_SERVER] == null) ! ip_sockets[Defines.NS_SERVER] = Socket(Defines.NS_SERVER, ip.string, (int) port.value); if (ip_sockets[Defines.NS_CLIENT] == null) ! ip_sockets[Defines.NS_CLIENT] = Socket(Defines.NS_CLIENT, ip.string, Defines.PORT_ANY); } *************** *** 281,285 **** } else { // open sockets ! NET_OpenIP(); } } --- 281,285 ---- } else { // open sockets ! OpenIP(); } } *************** *** 290,294 **** * ==================== NET_Init ==================== */ ! public static void NET_Init() { //empty } --- 290,294 ---- * ==================== NET_Init ==================== */ ! public static void Init() { //empty } *************** *** 297,301 **** * ==================== NET_Socket ==================== */ ! public static DatagramSocket NET_Socket(int sock, String ip, int port) { DatagramSocket newsocket = null; --- 297,301 ---- * ==================== NET_Socket ==================== */ ! public static DatagramSocket Socket(int sock, String ip, int port) { DatagramSocket newsocket = null; *************** *** 332,336 **** * ==================== NET_Shutdown ==================== */ ! public static void NET_Shutdown() { // close sockets Config(false); --- 332,336 ---- * ==================== NET_Shutdown ==================== */ ! public static void Shutdown() { // close sockets Config(false); *************** *** 338,342 **** // sleeps msec or until net socket is ready ! public static void NET_Sleep(int msec) { if (ip_sockets[Defines.NS_SERVER] == null || (Globals.dedicated != null && Globals.dedicated.value == 0)) --- 338,342 ---- // sleeps msec or until net socket is ready ! public static void Sleep(int msec) { if (ip_sockets[Defines.NS_SERVER] == null || (Globals.dedicated != null && Globals.dedicated.value == 0)) |
From: Carsten W. <ca...@us...> - 2004-10-17 21:31:42
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20259/src/jake2/server Modified Files: SV_MAIN.java Log Message: NET methods refactored (name cleanup) Index: SV_MAIN.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_MAIN.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SV_MAIN.java 22 Sep 2004 19:22:12 -0000 1.8 --- SV_MAIN.java 17 Oct 2004 21:31:32 -0000 1.9 *************** *** 258,262 **** // see if we already have a challenge for this ip for (i = 0; i < Defines.MAX_CHALLENGES; i++) { ! if (NET.NET_CompareBaseAdr(Globals.net_from, SV_INIT.svs.challenges[i].adr)) break; --- 258,262 ---- // see if we already have a challenge for this ip for (i = 0; i < Defines.MAX_CHALLENGES; i++) { ! if (NET.CompareBaseAdr(Globals.net_from, SV_INIT.svs.challenges[i].adr)) break; *************** *** 331,335 **** if (!NET.IsLocalAddress(adr)) { for (i = 0; i < Defines.MAX_CHALLENGES; i++) { ! if (NET.NET_CompareBaseAdr(Globals.net_from, SV_INIT.svs.challenges[i].adr)) { if (challenge == SV_INIT.svs.challenges[i].challenge) --- 331,335 ---- if (!NET.IsLocalAddress(adr)) { for (i = 0; i < Defines.MAX_CHALLENGES; i++) { ! if (NET.CompareBaseAdr(Globals.net_from, SV_INIT.svs.challenges[i].adr)) { if (challenge == SV_INIT.svs.challenges[i].challenge) *************** *** 353,357 **** if (cl.state == Defines.cs_free) continue; ! if (NET.NET_CompareBaseAdr(adr, cl.netchan.remote_address) && (cl.netchan.qport == qport || adr.port == cl.netchan.remote_address.port)) { if (!NET.IsLocalAddress(adr) --- 353,357 ---- if (cl.state == Defines.cs_free) continue; ! if (NET.CompareBaseAdr(adr, cl.netchan.remote_address) && (cl.netchan.qport == qport || adr.port == cl.netchan.remote_address.port)) { if (!NET.IsLocalAddress(adr) *************** *** 628,632 **** if (cl.state == Defines.cs_free) continue; ! if (!NET.NET_CompareBaseAdr(Globals.net_from, cl.netchan.remote_address)) continue; --- 628,632 ---- if (cl.state == Defines.cs_free) continue; ! if (!NET.CompareBaseAdr(Globals.net_from, cl.netchan.remote_address)) continue; *************** *** 777,781 **** SV_INIT.svs.realtime = SV_INIT.sv.time - 100; } ! NET.NET_Sleep(SV_INIT.sv.time - SV_INIT.svs.realtime); return; } --- 777,781 ---- SV_INIT.svs.realtime = SV_INIT.sv.time - 100; } ! NET.Sleep(SV_INIT.sv.time - SV_INIT.svs.realtime); return; } |
From: Carsten W. <ca...@us...> - 2004-10-17 20:33:27
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4845/src/jake2/qcommon Modified Files: netadr_t.java Log Message: nonblocking network and code cleanup Index: netadr_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/netadr_t.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** netadr_t.java 17 Oct 2004 20:20:09 -0000 1.3 --- netadr_t.java 17 Oct 2004 20:33:18 -0000 1.4 *************** *** 23,26 **** --- 23,28 ---- package jake2.qcommon; + import jake2.Defines; + import java.net.InetAddress; import java.net.UnknownHostException; *************** *** 32,45 **** public int port; ! public byte ip[] = { 0, 0, 0, 0 }; ! ! //public byte ipx[] = new byte[10]; InetAddress ia = null; public InetAddress getInetAddress() throws UnknownHostException { ! if (ia == null) ia = InetAddress.getByAddress(ip); ! return ia; } --- 34,58 ---- public int port; ! public byte ip[]; InetAddress ia = null; + public netadr_t() { + this.type = Defines.NA_LOOPBACK; + this.port = 0; // any + try { + this.ip = InetAddress.getByName("localhost").getAddress(); + } catch (UnknownHostException e) { + } + } + public InetAddress getInetAddress() throws UnknownHostException { ! if (type == Defines.NA_BROADCAST) { ! ia = InetAddress.getByName("255.255.255.255"); ! } else if (type == Defines.NA_LOOPBACK) { ! ia = InetAddress.getByName("localhost"); ! } else if (ia == null) { ia = InetAddress.getByAddress(ip); ! } return ia; } |
From: Carsten W. <ca...@us...> - 2004-10-17 20:33:26
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4845/src/jake2/sys Modified Files: NET.java Log Message: nonblocking network and code cleanup Index: NET.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/NET.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NET.java 17 Oct 2004 20:20:09 -0000 1.3 --- NET.java 17 Oct 2004 20:33:17 -0000 1.4 *************** *** 30,44 **** import jake2.qcommon.*; import java.net.*; ! import java.util.Arrays; ! ! public final class NET extends Defines { ! public static netadr_t net_local_adr = new netadr_t(); ! // 127.0.0.1 ! public final static int LOOPBACK = 0x7f000001; ! public final static int MAX_LOOPBACK = 4; public static class loopmsg_t { --- 30,44 ---- import jake2.qcommon.*; + import java.io.IOException; import java.net.*; ! import java.nio.ByteBuffer; ! import java.nio.channels.DatagramChannel; ! public final class NET { ! private final static int MAX_LOOPBACK = 4; ! // local loopback adress ! private static netadr_t net_local_adr = new netadr_t(); public static class loopmsg_t { *************** *** 67,111 **** } ! public static DatagramSocket ip_sockets[] = { null, null }; ! ! //public static DatagramSocket ipx_sockets[] = new int[2]; ! // we dont need beschissene sockaddr_in structs in java ! //============================================================================= - // void NetadrToSockadr (netadr_t *a, struct sockaddr_in *s) - // { - // memset (s, 0, sizeof(*s)); - // - // if (a.type == NA_BROADCAST) - // { - // s.sin_family = AF_INET; - // - // s.sin_port = a.port; - // *(int *)&s.sin_addr = -1; - // } - // else if (a.type == NA_IP) - // { - // s.sin_family = AF_INET; - // - // *(int *)&s.sin_addr = *(int *)&a.ip; - // s.sin_port = a.port; - // } - // } - // - // void SockadrToNetadr (struct sockaddr_in *s, netadr_t *a) - // { - // *(int *)&a.ip = *(int *)&s.sin_addr; - // a.port = s.sin_port; - // a.type = NA_IP; - // } - // - public static boolean CompareAdr(netadr_t a, netadr_t b) { ! if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] ! && a.ip[3] == b.ip[3] && a.port == b.port) ! return true; ! return false; } --- 67,79 ---- } ! private static DatagramChannel[] ip_channels = { null, null }; ! private static DatagramSocket[] ip_sockets = { null, null }; //============================================================================= public static boolean CompareAdr(netadr_t a, netadr_t b) { ! return (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] ! && a.ip[3] == b.ip[3] && a.port == b.port); } *************** *** 123,149 **** if (a.type == Defines.NA_IP) { ! if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] ! && a.ip[3] == b.ip[3]) ! return true; ! return false; } - - /* - * if (a.type == Defines.NA_IPX) { for (int n = 0; n < 10; n++) if - * (a.ipx[n] != b.ipx[n]) return false; - * - * //was: //if ((memcmp(a.ipx, b.ipx, 10) == 0)) return true; return - * true; } - */ - return false; } public static String AdrToString(netadr_t a) { - //was: - //static char s[64]; - //Com_sprintf (s, sizeof(s), "%i.%i.%i.%i:%i", a.ip[0], a.ip[1], - // a.ip[2], a.ip[3], ntohs(a.port)); - return "" + (a.ip[0] & 0xff) + "." + (a.ip[1] & 0xff) + "." + (a.ip[2] & 0xff) + "." + (a.ip[3] & 0xff) + ":" + a.port; --- 91,101 ---- if (a.type == Defines.NA_IP) { ! return (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] ! && a.ip[2] == b.ip[2] && a.ip[3] == b.ip[3]); } return false; } public static String AdrToString(netadr_t a) { return "" + (a.ip[0] & 0xff) + "." + (a.ip[1] & 0xff) + "." + (a.ip[2] & 0xff) + "." + (a.ip[3] & 0xff) + ":" + a.port; *************** *** 151,240 **** public static String NET_BaseAdrToString(netadr_t a) { - //was: - //static char s[64]; - //Com_sprintf (s, sizeof(s), "%i.%i.%i.%i", a.ip[0], a.ip[1], a.ip[2], - // a.ip[3]); return "" + (a.ip[0] & 0xff) + "." + (a.ip[1] & 0xff) + "." + (a.ip[2] & 0xff) + "." + (a.ip[3] & 0xff); } - /* - * ============= NET_StringToAdr - * - * localhost idnewt idnewt:28000 192.246.40.70 192.246.40.70:28000 - * ============= - */ - // boolean NET_StringToSockaddr (char *s, struct sockaddr *sadr) - // { - // struct hostent *h; - // char *colon; - // char copy[128]; - // - // memset (sadr, 0, sizeof(*sadr)); - // ((struct sockaddr_in *)sadr).sin_family = AF_INET; - // - // ((struct sockaddr_in *)sadr).sin_port = 0; - // - // strcpy (copy, s); - // // strip off a trailing :port if present - // for (colon = copy ; *colon ; colon++) - // if (*colon == ':') - // { - // *colon = 0; - // ((struct sockaddr_in *)sadr).sin_port = htons((short)atoi(colon+1)); - // } - // - // if (copy[0] >= '0' && copy[0] <= '9') - // { - // *(int *)&((struct sockaddr_in *)sadr).sin_addr = inet_addr(copy); - // } - // else - // { - // if (! (h = gethostbyname(copy)) ) - // return 0; - // *(int *)&((struct sockaddr_in *)sadr).sin_addr = *(int - // *)h.h_addr_list[0]; - // } - // - // return true; - // } - // - // /* - // ============= - // NET_StringToAdr - // - // localhost - // idnewt - // idnewt:28000 - // 192.246.40.70 - // 192.246.40.70:28000 - // ============= - // */ - // boolean NET_StringToAdr (char *s, netadr_t *a) - // { - // struct sockaddr_in sadr; - // - // if (!strcmp (s, "localhost")) - // { - // memset (a, 0, sizeof(*a)); - // a.type = NA_LOOPBACK; - // return true; - // } - // - // if (!NET_StringToSockaddr (s, (struct sockaddr *)&sadr)) - // return false; - // - // SockadrToNetadr (&sadr, a); - // - // return true; - // } - // public static boolean StringToAdr(String s, netadr_t a) { - - // bugfix bzw. hack cwei if (s.equalsIgnoreCase("localhost")) { ! a.type = Defines.NA_LOOPBACK; ! Arrays.fill(a.ip, (byte) 0); ! a.port = 0; return true; } --- 103,113 ---- public static String NET_BaseAdrToString(netadr_t a) { return "" + (a.ip[0] & 0xff) + "." + (a.ip[1] & 0xff) + "." + (a.ip[2] & 0xff) + "." + (a.ip[3] & 0xff); } public static boolean StringToAdr(String s, netadr_t a) { if (s.equalsIgnoreCase("localhost")) { ! a.set(net_local_adr); return true; } *************** *** 243,252 **** InetAddress ia = InetAddress.getByName(address[0]); a.ip = ia.getAddress(); ! a.type = NA_IP; if (address.length == 2) a.port = Integer.parseInt(address[1]); return true; } catch (Exception e) { ! e.printStackTrace(); return false; } --- 116,125 ---- InetAddress ia = InetAddress.getByName(address[0]); a.ip = ia.getAddress(); ! a.type = Defines.NA_IP; if (address.length == 2) a.port = Integer.parseInt(address[1]); return true; } catch (Exception e) { ! Com.Println(e.getMessage()); return false; } *************** *** 265,274 **** */ - // trivial! this SHOULD work ! public static boolean NET_GetLoopPacket(int sock, netadr_t net_from, sizebuf_t net_message) { - int i; loopback_t loop; - loop = loopbacks[sock]; --- 138,144 ---- *************** *** 279,299 **** return false; ! i = loop.get & (MAX_LOOPBACK - 1); loop.get++; - //memcpy (net_message.data, loop.msgs[i].data, loop.msgs[i].datalen); System.arraycopy(loop.msgs[i].data, 0, net_message.data, 0, loop.msgs[i].datalen); net_message.cursize = loop.msgs[i].datalen; ! net_from.ip = net_local_adr.ip; ! net_from.port = net_local_adr.port; ! net_from.type = net_local_adr.type; ! return true; - } - // trivial! this SHOULD work ! public static void NET_SendLoopPacket(int sock, int length, byte[] data, netadr_t to) { --- 149,163 ---- return false; ! int i = loop.get & (MAX_LOOPBACK - 1); loop.get++; System.arraycopy(loop.msgs[i].data, 0, net_message.data, 0, loop.msgs[i].datalen); net_message.cursize = loop.msgs[i].datalen; ! net_from.set(net_local_adr); return true; } public static void NET_SendLoopPacket(int sock, int length, byte[] data, netadr_t to) { *************** *** 307,405 **** loop.send++; - //memcpy (loop.msgs[i].data, data, length); - System.arraycopy(data, 0, loop.msgs[i].data, 0, length); loop.msgs[i].datalen = length; } - private static DatagramPacket receivedatagrampacket = new DatagramPacket( - new byte[65507], 65507); - //============================================================================= public static boolean GetPacket(int sock, netadr_t net_from, sizebuf_t net_message) { - DatagramSocket net_socket; - // int ret; - // struct sockaddr_in from; - // int fromlen; - // - // int protocol; - // int err; if (NET_GetLoopPacket(sock, net_from, net_message)) { - //Com.DPrintf("received packet on sock=" + sock + " len=" + - // net_message.cursize+"\n"); return true; } - net_socket = ip_sockets[sock]; ! if (net_socket == null) return false; try { ! net_socket.receive(receivedatagrampacket); ! // no timeout... ! net_from.ip = receivedatagrampacket.getAddress().getAddress(); ! net_from.port = receivedatagrampacket.getPort(); ! net_from.type = NA_IP; ! if (receivedatagrampacket.getLength() > net_message.maxsize) { ! Com.Printf("Oversize packet from " + AdrToString(net_from) ! + "\n"); return false; } - int length = receivedatagrampacket.getLength(); - System.arraycopy(receivedatagrampacket.getData(), 0, - net_message.data, 0, length); - - // bugfix cwei - net_message.cursize = length; // set the size - net_message.data[length] = 0; // sentinel - - //Com.DPrintf(Lib.hexDump(net_message.data, Math.max(length, length - // - (length % 16) + 16), false)); - //Com.DPrintf("\n"); return true; ! } catch (SocketTimeoutException e1) { ! return false; ! } ! ! catch (Exception e) { Com.DPrintf("NET_GetPacket: " + e + " from " + AdrToString(net_from) + "\n"); return false; } - - //fromlen = sizeof(from); - //ret = recvfrom (net_socket, net_message.data, net_message.maxsize - // , 0, (struct sockaddr *)&from, &fromlen); - - //SockadrToNetadr (&from, net_from); - - // if (ret == -1) - // { - // err = errno; - // - // if (err == EWOULDBLOCK || err == ECONNREFUSED) - // continue; - // Com_Printf ("NET_GetPacket: %s from %s\n", NET_ErrorString(), - // NET_AdrToString(*net_from)); - // continue; - // } - // - // if (ret == net_message.maxsize) - // { - // Com_Printf ("Oversize packet from %s\n", NET_AdrToString - // (*net_from)); - // continue; - // } - // - // net_message.cursize = ret; - // return true; - } --- 171,219 ---- loop.send++; System.arraycopy(data, 0, loop.msgs[i].data, 0, length); loop.msgs[i].datalen = length; } //============================================================================= public static boolean GetPacket(int sock, netadr_t net_from, sizebuf_t net_message) { if (NET_GetLoopPacket(sock, net_from, net_message)) { return true; } ! if (ip_sockets[sock] == null) return false; try { ! ByteBuffer receiveBuffer = ByteBuffer.wrap(net_message.data); ! InetSocketAddress srcSocket = (InetSocketAddress) ip_channels[sock] ! .receive(receiveBuffer); ! if (srcSocket == null) ! return false; ! net_from.ip = srcSocket.getAddress().getAddress(); ! net_from.port = srcSocket.getPort(); ! net_from.type = Defines.NA_IP; ! int packetLength = receiveBuffer.position(); ! ! if (packetLength > net_message.maxsize) { ! Com.Println("Oversize packet from " + AdrToString(net_from)); return false; } + // set the size + net_message.cursize = packetLength; + // set the sentinel + net_message.data[packetLength] = 0; return true; ! } catch (IOException e) { Com.DPrintf("NET_GetPacket: " + e + " from " + AdrToString(net_from) + "\n"); return false; } } *************** *** 407,464 **** public static void SendPacket(int sock, int length, byte[] data, netadr_t to) { ! //Com.Printf("NET_SendPacket: sock=" + sock + " len=" + length + "\n"); ! //Com.DPrintf(Lib.hexDump(data, Math.max(length, length - (length % 16) ! // + 16), false)); ! //Com.DPrintf("\n"); ! ! int ret; ! //struct sockaddr_in addr; ! ! DatagramSocket net_socket; ! ! if (to.type == NA_LOOPBACK) { NET_SendLoopPacket(sock, length, data, to); return; } ! if (to.type == NA_BROADCAST) { ! net_socket = ip_sockets[sock]; ! if (net_socket == null) ! return; ! } else if (to.type == NA_IP) { ! net_socket = ip_sockets[sock]; ! if (net_socket == null) ! return; ! } ! /* ! * else if (to.type == NA_IPX) { net_socket = ipx_sockets[sock]; if ! * (net_socket==null) return; } else if (to.type == NA_BROADCAST_IPX) { ! * net_socket = ipx_sockets[sock]; if (!net_socket) return; } ! */ ! else { ! Com.Error(ERR_FATAL, "NET_SendPacket: bad address type"); return; - } - - //was: - //NetadrToSockadr (&to, &addr); - - try { //was: - //ret = sendto (net_socket, data, length, 0, (struct sockaddr - // *)&addr, sizeof(addr) ); - - DatagramPacket dp; ! if (to.type == NA_BROADCAST) { ! dp = new DatagramPacket(data, length, InetAddress ! .getByAddress(new byte[] { -1, -1, -1, -1 }), to.port); ! } else ! dp = new DatagramPacket(data, length, to.getInetAddress(), ! to.port); ! net_socket.send(dp); } catch (Exception e) { ! Com.Printf("NET_SendPacket ERROR: " + e + " to " + AdrToString(to) ! + "\n"); } } --- 221,245 ---- public static void SendPacket(int sock, int length, byte[] data, netadr_t to) { ! if (to.type == Defines.NA_LOOPBACK) { NET_SendLoopPacket(sock, length, data, to); return; } ! if (ip_sockets[sock] == null) return; ! if (to.type != Defines.NA_BROADCAST && to.type != Defines.NA_IP) { ! Com.Error(Defines.ERR_FATAL, "NET_SendPacket: bad address type"); ! return; ! } ! try { ! SocketAddress dstSocket = new InetSocketAddress( ! to.getInetAddress(), to.port); ! ip_channels[sock].send(ByteBuffer.wrap(data, 0, length), dstSocket); } catch (Exception e) { ! Com ! .Println("NET_SendPacket ERROR: " + e + " to " ! + AdrToString(to)); } } *************** *** 472,511 **** cvar_t port, ip; ! port = Cvar.Get("port", "" + Defines.PORT_SERVER, CVAR_NOSET); ! ip = Cvar.Get("ip", "localhost", CVAR_NOSET); ! ! if (ip_sockets[NS_SERVER] == null) ! ip_sockets[NS_SERVER] = NET_Socket(ip.string, (int) port.value); ! if (ip_sockets[NS_CLIENT] == null) ! ip_sockets[NS_CLIENT] = NET_Socket(ip.string, Defines.PORT_ANY); ! } ! /* ! * ==================== NET_OpenIPX ==================== ! */ ! public static void NET_OpenIPX() { } /* ! * ==================== NET_Config * ! * A single player game will only use the loopback code ==================== */ public static void Config(boolean multiplayer) { ! int i; ! ! if (!multiplayer) { // shut down any existing sockets ! for (i = 0; i < 2; i++) { if (ip_sockets[i] != null) { ip_sockets[i].close(); ip_sockets[i] = null; } - /* - * if (ipx_sockets[i]) { ipx_sockets[i].close(); ipx_sockets[i] = - * null; } - */ } ! } else { // open sockets NET_OpenIP(); } --- 253,284 ---- cvar_t port, ip; ! port = Cvar.Get("port", "" + Defines.PORT_SERVER, Defines.CVAR_NOSET); ! ip = Cvar.Get("ip", "localhost", Defines.CVAR_NOSET); ! if (ip_sockets[Defines.NS_SERVER] == null) ! ip_sockets[Defines.NS_SERVER] = NET_Socket(Defines.NS_SERVER, ! ip.string, (int) port.value); ! if (ip_sockets[Defines.NS_CLIENT] == null) ! ip_sockets[Defines.NS_CLIENT] = NET_Socket(Defines.NS_CLIENT, ! ip.string, Defines.PORT_ANY); } /* ! * ==================== NET_Config ==================== * ! * A single player game will only use the loopback code */ public static void Config(boolean multiplayer) { ! if (!multiplayer) { ! // shut down any existing sockets ! for (int i = 0; i < 2; i++) { if (ip_sockets[i] != null) { ip_sockets[i].close(); ip_sockets[i] = null; } } ! } else { ! // open sockets NET_OpenIP(); } *************** *** 524,600 **** * ==================== NET_Socket ==================== */ ! public static DatagramSocket NET_Socket(String ip, int port) { DatagramSocket newsocket = null; try { if (ip == null || ip.length() == 0 || ip.equals("localhost")) { ! if (port == PORT_ANY) { ! newsocket = new DatagramSocket(); } else { ! newsocket = new DatagramSocket(port); } } else { InetAddress ia = InetAddress.getByName(ip); ! newsocket = new DatagramSocket(port, ia); } newsocket.setBroadcast(true); - // nonblocking (1 ms), 0== neverending infinite timeout - newsocket.setSoTimeout(1); } catch (Exception e) { newsocket = null; } - return newsocket; - - // int newsocket; - // //struct sockaddr_in address; - // qboolean _true = true; - // int i = 1; - // - // if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) - // { - // Com.Printf ("ERROR: UDP_OpenSocket: socket: ", NET_ErrorString()); - // return 0; - // } - // - // // make it non-blocking - // if (ioctl (newsocket, FIONBIO, &_true) == -1) - // { - // Com_Printf ("ERROR: UDP_OpenSocket: ioctl FIONBIO:%s\n", - // NET_ErrorString()); - // return 0; - // } - // - // // make it broadcast capable - // if (setsockopt(newsocket, SOL_SOCKET, SO_BROADCAST, (char *)&i, - // sizeof(i)) == -1) - // { - // Com_Printf ("ERROR: UDP_OpenSocket: setsockopt SO_BROADCAST:%s\n", - // NET_ErrorString()); - // return 0; - // } - // - // if (!net_interface || !net_interface[0] || !stricmp(net_interface, - // "localhost")) - // address.sin_addr.s_addr = INADDR_ANY; - // else - // NET_StringToSockaddr (net_interface, (struct sockaddr *)&address); - // - // if (port == PORT_ANY) - // address.sin_port = 0; - // else - // address.sin_port = htons((short)port); - // - // address.sin_family = AF_INET; - // - // if( bind (newsocket, (void *)&address, sizeof(address)) == -1) - // { - // Com_Printf ("ERROR: UDP_OpenSocket: bind: %s\n", NET_ErrorString()); - // close (newsocket); - // return 0; - // } - // - // return newsocket; } --- 297,330 ---- * ==================== NET_Socket ==================== */ ! public static DatagramSocket NET_Socket(int sock, String ip, int port) { DatagramSocket newsocket = null; try { + if (ip_channels[sock] == null || !ip_channels[sock].isOpen()) + ip_channels[sock] = DatagramChannel.open(); + if (ip == null || ip.length() == 0 || ip.equals("localhost")) { ! if (port == Defines.PORT_ANY) { ! newsocket = ip_channels[sock].socket(); ! newsocket.bind(new InetSocketAddress(0)); } else { ! newsocket = ip_channels[sock].socket(); ! newsocket.bind(new InetSocketAddress(port)); } } else { InetAddress ia = InetAddress.getByName(ip); ! newsocket = ip_channels[sock].socket(); ! newsocket.bind(new InetSocketAddress(ia, port)); } + // nonblocking channel + ip_channels[sock].configureBlocking(false); + // the socket have to be broadcastable newsocket.setBroadcast(true); } catch (Exception e) { + Com.Println(e.getMessage()); newsocket = null; } return newsocket; } *************** *** 603,623 **** */ public static void NET_Shutdown() { ! Config(false); // close sockets ! } ! ! /* ! * ==================== NET_ErrorString ==================== ! */ ! public static String NET_ErrorString() { ! ! int code; ! //code = errno; ! //return strerror (code); ! return "errno can not yet resolved in java"; } // sleeps msec or until net socket is ready public static void NET_Sleep(int msec) { ! if (ip_sockets[NS_SERVER] == null || (Globals.dedicated != null && Globals.dedicated.value == 0)) return; // we're not a server, just run full speed --- 333,343 ---- */ public static void NET_Shutdown() { ! // close sockets ! Config(false); } // sleeps msec or until net socket is ready public static void NET_Sleep(int msec) { ! if (ip_sockets[Defines.NS_SERVER] == null || (Globals.dedicated != null && Globals.dedicated.value == 0)) return; // we're not a server, just run full speed *************** *** 645,648 **** */ } - } \ No newline at end of file --- 365,367 ---- |
From: Carsten W. <ca...@us...> - 2004-10-17 20:20:26
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv964/src/jake2/qcommon Modified Files: netadr_t.java Log Message: reformat (java conventions) Index: netadr_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/netadr_t.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** netadr_t.java 8 Jul 2004 15:58:46 -0000 1.2 --- netadr_t.java 17 Oct 2004 20:20:09 -0000 1.3 *************** *** 1,25 **** /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! ! See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! */ // Created on 27.11.2003 by RST. // $Id$ - package jake2.qcommon; --- 1,24 ---- /* ! * Copyright (C) 1997-2001 Id Software, Inc. ! * ! * This program is free software; you can redistribute it and/or modify it under ! * the terms of the GNU General Public License as published by the Free Software ! * Foundation; either version 2 of the License, or (at your option) any later ! * version. ! * ! * This program is distributed in the hope that it will be useful, but WITHOUT ! * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ! * FOR A PARTICULAR PURPOSE. ! * ! * See the GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License along with ! * this program; if not, write to the Free Software Foundation, Inc., 59 Temple ! * Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! */ // Created on 27.11.2003 by RST. // $Id$ package jake2.qcommon; *************** *** 28,54 **** public class netadr_t { - - public int type; - public int port; - public byte ip[] = {0,0,0,0}; - //public byte ipx[] = new byte[10]; - - InetAddress ia = null; - - public InetAddress getInetAddress() throws UnknownHostException - { - if (ia == null) - ia = InetAddress.getByAddress(ip); ! return ia; ! } ! public void set(netadr_t from) { ! type = from.type; ! port = from.port; ! ip[0] = from.ip[0]; ! ip[1] = from.ip[1]; ! ip[2] = from.ip[2]; ! ip[3] = from.ip[3]; ! } ! } --- 27,55 ---- public class netadr_t { ! public int type; ! public int port; ! ! public byte ip[] = { 0, 0, 0, 0 }; ! ! //public byte ipx[] = new byte[10]; ! ! InetAddress ia = null; ! ! public InetAddress getInetAddress() throws UnknownHostException { ! if (ia == null) ! ia = InetAddress.getByAddress(ip); ! ! return ia; ! } ! ! public void set(netadr_t from) { ! type = from.type; ! port = from.port; ! ip[0] = from.ip[0]; ! ip[1] = from.ip[1]; ! ip[2] = from.ip[2]; ! ip[3] = from.ip[3]; ! } ! } \ No newline at end of file |
From: Carsten W. <ca...@us...> - 2004-10-17 20:20:26
|
Update of /cvsroot/jake2/jake2/src/jake2/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv964/src/jake2/sys Modified Files: NET.java Log Message: reformat (java conventions) Index: NET.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sys/NET.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NET.java 9 Jul 2004 06:50:47 -0000 1.2 --- NET.java 17 Oct 2004 20:20:09 -0000 1.3 *************** *** 1,27 **** /* ! * NET.java ! * Copyright (C) 2003 * * $Id$ */ /* ! Copyright (C) 1997-2001 Id Software, Inc. ! ! This program is free software; you can redistribute it and/or [...1345 lines suppressed...] ! //ip_sockets[NS_SERVER]. ! ! // this should wait up to 100ms until a packet ! /* ! * struct timeval timeout; fd_set fdset; extern cvar_t *dedicated; ! * extern qboolean stdin_active; ! * ! * if (!ip_sockets[NS_SERVER] || (dedicated && !dedicated.value)) ! * return; // we're not a server, just run full speed ! * ! * FD_ZERO(&fdset); if (stdin_active) FD_SET(0, &fdset); // stdin is ! * processed too FD_SET(ip_sockets[NS_SERVER], &fdset); // network ! * socket timeout.tv_sec = msec/1000; timeout.tv_usec = ! * (msec%1000)*1000; select(ip_sockets[NS_SERVER]+1, &fdset, NULL, NULL, ! * &timeout); ! */ ! } ! ! } \ No newline at end of file |
From: Holger Z. <hz...@us...> - 2004-10-11 14:05:39
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29003/src/jake2/client Modified Files: CL_ents.java CL.java CL_tent.java CL_newfx.java CL_fx.java Log Message: remove some unreferenced functions Index: CL_newfx.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_newfx.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CL_newfx.java 4 Oct 2004 12:50:37 -0000 1.5 --- CL_newfx.java 11 Oct 2004 14:04:16 -0000 1.6 *************** *** 134,181 **** } - /* - * =============== CL_SmokeTrail =============== - */ - static void SmokeTrail(float[] start, float[] end, int colorStart, - int colorRun, int spacing) { - float[] move = new float[3]; - float[] vec = new float[3]; - float len; - int j; - cparticle_t p; - - Math3D.VectorCopy(start, move); - Math3D.VectorSubtract(end, start, vec); - len = Math3D.VectorNormalize(vec); - - Math3D.VectorScale(vec, spacing, vec); - - // FIXME: this is a really silly way to have a loop - while (len > 0) { - len -= spacing; - - if (CL_fx.free_particles == null) - return; - p = CL_fx.free_particles; - CL_fx.free_particles = p.next; - p.next = CL_fx.active_particles; - CL_fx.active_particles = p; - Math3D.VectorClear(p.accel); - - p.time = Globals.cl.time; - - p.alpha = 1.0f; - p.alphavel = -1.0f / (1 + Globals.rnd.nextFloat() * 0.5f); - p.color = colorStart + (Lib.rand() % colorRun); - for (j = 0; j < 3; j++) { - p.org[j] = move[j] + Lib.crand() * 3; - p.accel[j] = 0; - } - p.vel[2] = 20 + Lib.crand() * 5; - - Math3D.VectorAdd(move, vec, move); - } - } - static void ForceWall(float[] start, float[] end, int color) { float[] move = new float[3]; --- 134,137 ---- *************** *** 224,320 **** } - // static void FlameEffects(centity_t ent, float[] origin) { - // int n, count; - // int j; - // cparticle_t p; - // - // count = rand() & 0xF; - // - // for (n = 0; n < count; n++) { - // if (free_particles == null) - // return; - // - // p = free_particles; - // free_particles = p.next; - // p.next = active_particles; - // active_particles = p; - // - // VectorClear(p.accel); - // p.time = cl.time; - // - // p.alpha = 1.0f; - // p.alphavel = -1.0f / (1 + frand() * 0.2f); - // p.color = 226 + (rand() % 4); - // for (j = 0; j < 3; j++) { - // p.org[j] = origin[j] + crand() * 5; - // p.vel[j] = crand() * 5; - // } - // p.vel[2] = crand() * -10; - // p.accel[2] = -PARTICLE_GRAVITY; - // } - // - // count = rand() & 0x7; - // - // for (n = 0; n < count; n++) { - // if (free_particles == null) - // return; - // p = free_particles; - // free_particles = p.next; - // p.next = active_particles; - // active_particles = p; - // VectorClear(p.accel); - // - // p.time = cl.time; - // - // p.alpha = 1.0f; - // p.alphavel = -1.0f / (1 + frand() * 0.5f); - // p.color = 0 + (rand() % 4); - // for (j = 0; j < 3; j++) { - // p.org[j] = origin[j] + crand() * 3; - // } - // p.vel[2] = 20 + crand() * 5; - // } - // - // } - - /* - * =============== CL_GenericParticleEffect =============== - */ - static void GenericParticleEffect(float[] org, float[] dir, int color, - int count, int numcolors, int dirspread, float alphavel) { - int i, j; - cparticle_t p; - float d; - - for (i = 0; i < count; i++) { - if (CL_fx.free_particles == null) - return; - p = CL_fx.free_particles; - CL_fx.free_particles = p.next; - p.next = CL_fx.active_particles; - CL_fx.active_particles = p; - - p.time = Globals.cl.time; - if (numcolors > 1) - p.color = color + (Lib.rand() & numcolors); - else - p.color = color; - - d = Lib.rand() & dirspread; - for (j = 0; j < 3; j++) { - p.org[j] = org[j] + ((Lib.rand() & 7) - 4) + d * dir[j]; - p.vel[j] = Lib.crand() * 20; - } - - p.accel[0] = p.accel[1] = 0; - p.accel[2] = -CL_fx.PARTICLE_GRAVITY; - // VectorCopy (accel, p.accel); - p.alpha = 1.0f; - - p.alphavel = -1.0f / (0.5f + Globals.rnd.nextFloat() * alphavel); - // p.alphavel = alphavel; - } - } - /* * =============== CL_BubbleTrail2 (lets you control the # of bubbles by --- 180,183 ---- *************** *** 773,812 **** } - static void Tracker_Explode(float[] origin) { - float[] dir = new float[3]; - float[] backdir = new float[3]; - int i; - cparticle_t p; - - for (i = 0; i < 300; i++) { - if (CL_fx.free_particles == null) - return; - p = CL_fx.free_particles; - CL_fx.free_particles = p.next; - p.next = CL_fx.active_particles; - CL_fx.active_particles = p; - Math3D.VectorClear(p.accel); - - p.time = Globals.cl.time; - - p.alpha = 1.0f; - p.alphavel = -1.0f; - p.color = 0; - - dir[0] = Lib.crand(); - dir[1] = Lib.crand(); - dir[2] = Lib.crand(); - Math3D.VectorNormalize(dir); - Math3D.VectorScale(dir, -1, backdir); - - Math3D.VectorMA(origin, 64, dir, p.org); - Math3D.VectorScale(backdir, 64, p.vel); - } - - } - /* ! * =============== CL_TagTrail ! * * =============== */ --- 636,642 ---- } /* ! * =============== ! * CL_TagTrail * =============== */ Index: CL_ents.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_ents.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CL_ents.java 22 Sep 2004 19:22:07 -0000 1.6 --- CL_ents.java 11 Oct 2004 14:04:16 -0000 1.7 *************** *** 28,38 **** import jake2.Defines; import jake2.Globals; ! import jake2.game.entity_state_t; ! import jake2.game.player_state_t; ! import jake2.game.pmove_t; ! import jake2.qcommon.Com; ! import jake2.qcommon.FS; ! import jake2.qcommon.MSG; ! import jake2.render.model_t; import jake2.util.Math3D; --- 28,33 ---- import jake2.Defines; import jake2.Globals; ! import jake2.game.*; ! import jake2.qcommon.*; import jake2.util.Math3D; *************** *** 589,644 **** */ - public static model_t S_RegisterSexedModel(entity_state_t ent, String base) { - int n; - model_t mdl; - String model; - String buffer; - - // determine what model the client is using - model = ""; - - n = Defines.CS_PLAYERSKINS + ent.number - 1; - - if (Globals.cl.configstrings[n].length() > 0) { - - int pos = Globals.cl.configstrings[n].indexOf('\\'); - if (pos != -1) { - pos++; - model = Globals.cl.configstrings[n].substring(pos); - pos = model.indexOf('/'); - if (pos != -1) - model = model.substring(0, pos); - } - } - // if we can't figure it out, they're male - if (model.length() == 0) - model = "male"; - - buffer = "players/" + model + "/" + base + 1; - mdl = Globals.re.RegisterModel(buffer); - if (mdl == null) { - // not found, try default weapon model - buffer = "players/" + model + "/weapon.md2"; - mdl = Globals.re.RegisterModel(buffer); - if (mdl == null) { - // no, revert to the male model - buffer = "players/male/" + base + 1; - mdl = Globals.re.RegisterModel(buffer); - if (mdl == null) { - // last try, default male weapon.md2 - buffer = "players/male/weapon.md2"; - mdl = Globals.re.RegisterModel(buffer); - } - } - } - - return mdl; - } - - // PMM - used in shell code - /* ! * =============== CL_AddPacketEntities ! * * =============== */ --- 584,590 ---- */ /* ! * =============== ! * CL_AddPacketEntities * =============== */ Index: CL_fx.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_fx.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CL_fx.java 22 Sep 2004 19:22:08 -0000 1.6 --- CL_fx.java 11 Oct 2004 14:04:16 -0000 1.7 *************** *** 52,56 **** float die; // stop lighting after this time - //float decay; // drop this each second float minlight; // don't add when contributing less --- 52,55 ---- *************** *** 231,251 **** } - /* - * =============== CL_NewDlight =============== - */ - static void NewDlight(int key, float x, float y, float z, float radius, float time) { - cdlight_t dl; - - dl = AllocDlight(key); - dl.origin[0] = x; - dl.origin[1] = y; - dl.origin[2] = z; - dl.radius = radius; - dl.die = Globals.cl.time + time; - } /* ! * =============== CL_RunDLights ! * * =============== */ --- 230,237 ---- } /* ! * =============== ! * CL_RunDLights * =============== */ *************** *** 262,273 **** return; } - //dl[i].radius -= cls.frametime * dl[i].decay; - //if (dl[i].radius < 0) - // dl[i].radius = 0; } } /* ! * ============== CL_ParseMuzzleFlash ============== */ static void ParseMuzzleFlash() { --- 248,258 ---- return; } } } /* ! * ============== ! * CL_ParseMuzzleFlash ! * ============== */ static void ParseMuzzleFlash() { *************** *** 1370,1422 **** } - /* - * =============== CL_QuadTrail - * - * =============== - */ - static void QuadTrail(float[] start, float[] end) { - float[] move = new float[3]; - float[] vec = new float[3]; - float len; - int j; - cparticle_t p; - int dec; - - Math3D.VectorCopy(start, move); - Math3D.VectorSubtract(end, start, vec); - len = Math3D.VectorNormalize(vec); - - dec = 5; - Math3D.VectorScale(vec, 5, vec); - - while (len > 0) { - len -= dec; - - if (free_particles == null) - return; - p = free_particles; - free_particles = p.next; - p.next = active_particles; - active_particles = p; - Math3D.VectorClear(p.accel); - - p.time = Globals.cl.time; - - p.alpha = 1.0f; - p.alphavel = -1.0f / (0.8f + Globals.rnd.nextFloat() * 0.2f); - p.color = 115; - for (j = 0; j < 3; j++) { - p.org[j] = move[j] + Lib.crand() * 16; - p.vel[j] = Lib.crand() * 5; - p.accel[j] = 0; - } - - Math3D.VectorAdd(move, vec, move); - } - } /* ! * =============== CL_FlagTrail ! * * =============== */ --- 1355,1362 ---- } /* ! * =============== ! * CL_FlagTrail * =============== */ Index: CL_tent.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_tent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CL_tent.java 4 Oct 2004 12:50:37 -0000 1.6 --- CL_tent.java 11 Oct 2004 14:04:16 -0000 1.7 *************** *** 386,408 **** /* ! * ================= CL_ParseParticles ================= ! */ ! static void ParseParticles() { ! int color, count; ! float[] pos = new float[3]; ! float[] dir = new float[3]; ! ! MSG.ReadPos(Globals.net_message, pos); ! MSG.ReadDir(Globals.net_message, dir); ! ! color = MSG.ReadByte(Globals.net_message); ! ! count = MSG.ReadByte(Globals.net_message); ! ! CL_fx.ParticleEffect(pos, dir, color, count); ! } ! ! /* ! * ================= CL_ParseBeam ================= */ static int ParseBeam(model_t model) { --- 386,392 ---- /* ! * ================= ! * CL_ParseBeam ! * ================= */ static int ParseBeam(model_t model) { *************** *** 1281,1285 **** CL_newfx.ColorFlash(pos, 0, 150, -1, -1, -1); CL_newfx.ColorExplosionParticles(pos, 0, 1); - // CL_Tracker_Explode (pos); S.StartSound(pos, 0, 0, cl_sfx_disrexp, 1, Defines.ATTN_NORM, 0); break; --- 1265,1268 ---- Index: CL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CL.java 4 Oct 2004 12:50:37 -0000 1.12 --- CL.java 11 Oct 2004 14:04:16 -0000 1.13 *************** *** 878,893 **** } - /* - * ================= CL_DumpPackets - * - * A vain attempt to help bad TCP stacks that cause problems when they - * overflow ================= - */ - static void DumpPackets() { - while (NET.GetPacket(Defines.NS_CLIENT, Globals.net_from, - Globals.net_message)) { - Com.Printf("dumping a packet\n"); - } - } /* --- 878,881 ---- |
From: Holger Z. <hz...@us...> - 2004-10-07 14:14:48
|
Update of /cvsroot/jake2/jake2/src/jake2/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25032/src/jake2/util Modified Files: Lib.java Log Message: remove some unreferenced functions Index: Lib.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/util/Lib.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Lib.java 4 Oct 2004 12:50:38 -0000 1.7 --- Lib.java 7 Oct 2004 14:12:59 -0000 1.8 *************** *** 24,28 **** package jake2.util; - import jake2.Defines; import jake2.Globals; import jake2.qcommon.Com; --- 24,27 ---- *************** *** 71,77 **** return in1.compareTo(in2); } ! public static boolean strstr(String i1, String i2) { ! return (i1.indexOf(i2) != -1); ! } public static float atof(String in) { float res = 0; --- 70,74 ---- return in1.compareTo(in2); } ! public static float atof(String in) { float res = 0; *************** *** 122,130 **** return in.length; } ! static byte[] buffer = new byte[Defines.MAX_INFO_STRING]; ! public static String readString(ByteBuffer bb, int len) { ! bb.get(buffer, 0, len); ! return new String(buffer, 0, len); ! } public static String hexdumpfile(ByteBuffer bb, int len) throws IOException { --- 119,123 ---- return in.length; } ! public static String hexdumpfile(ByteBuffer bb, int len) throws IOException { |
From: Holger Z. <hz...@us...> - 2004-10-07 14:14:28
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25032/src/jake2/game Modified Files: game_import_t.java Log Message: remove some unreferenced functions Index: game_import_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/game_import_t.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** game_import_t.java 22 Sep 2004 19:22:00 -0000 1.4 --- game_import_t.java 7 Oct 2004 14:13:07 -0000 1.5 *************** *** 24,37 **** import jake2.Defines; ! import jake2.client.SCR; ! import jake2.qcommon.CM; ! import jake2.qcommon.Cbuf; ! import jake2.qcommon.Com; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.PMove; ! import jake2.server.SV_GAME; ! import jake2.server.SV_INIT; ! import jake2.server.SV_SEND; ! import jake2.server.SV_WORLD; // --- 24,29 ---- import jake2.Defines; ! import jake2.qcommon.*; ! import jake2.server.*; // *************** *** 111,118 **** public pmove_t.PointContentsAdapter pointcontents; - public boolean inPVS(float[] p1, float[] p2) { - return SV_GAME.PF_inPVS(p1, p2); - } - public boolean inPHS(float[] p1, float[] p2) { return SV_GAME.PF_inPHS(p1, p2); --- 103,106 ---- *************** *** 158,164 **** } - public void WriteChar(int c) { - SV_GAME.PF_WriteChar(c); - } public void WriteByte(int c) { --- 146,149 ---- *************** *** 170,181 **** } - public void WriteLong(int c) { - SV_GAME.PF_WriteLong(c); - } - - public void WriteFloat(float f) { - SV_GAME.PF_WriteFloat(f); - } - public void WriteString(String s) { SV_GAME.PF_WriteString(s); --- 155,158 ---- *************** *** 191,212 **** } - // single byte encoded, very coarse - public void WriteAngle(float f) { - Com.Error(Defines.ERR_FATAL, "method is not implemented!"); - } - - // managed memory allocation - public void TagMalloc(int size, int tag) { - Com.Error(Defines.ERR_FATAL, "method is not implemented!"); - } - - public void TagFree(Object block) { - Com.Error(Defines.ERR_FATAL, "method is not implemented!"); - } - - public void FreeTags(int tag) { - Com.Error(Defines.ERR_FATAL, "method is not implemented!"); - } - // console variable interaction public cvar_t cvar(String var_name, String value, int flags) { --- 168,171 ---- *************** *** 244,249 **** } - public void DebugGraph(float value, int color) { - SCR.DebugGraph(value, color); - } } \ No newline at end of file --- 203,205 ---- |
From: Holger Z. <hz...@us...> - 2004-10-07 14:14:28
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25032/src/jake2/client Modified Files: Menu.java M.java Log Message: remove some unreferenced functions Index: Menu.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Menu.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Menu.java 4 Oct 2004 12:50:37 -0000 1.11 --- Menu.java 7 Oct 2004 14:13:00 -0000 1.12 *************** *** 3730,3735 **** static boolean IconOfSkinExists(String skin, String pcxfiles[], int npcxfiles) { ! int i; ! //char scratch[1024]; String scratch; --- 3730,3734 ---- static boolean IconOfSkinExists(String skin, String pcxfiles[], int npcxfiles) { ! String scratch; *************** *** 3743,3748 **** scratch += "_i.pcx"; ! for (i = 0; i < npcxfiles; i++) { ! if (Lib.strcmp(pcxfiles[i], scratch) == 0) return true; } --- 3742,3747 ---- scratch += "_i.pcx"; ! for (int i = 0; i < npcxfiles; i++) { ! if (pcxfiles[i].equals(scratch)) return true; } *************** *** 3900,3914 **** * * sort by male, female, then alphabetical */ ! if (Lib.strcmp(a.directory, "male") == 0) return -1; ! else if (Lib.strcmp(b.directory, "male") == 0) return 1; ! if (Lib.strcmp(a.directory, "female") == 0) return -1; ! else if (Lib.strcmp(b.directory, "female") == 0) return 1; ! return Lib.strcmp(a.directory, b.directory); } --- 3899,3913 ---- * * sort by male, female, then alphabetical */ ! if (a.directory.equals("male")) return -1; ! else if (b.directory.equals("male")) return 1; ! if (a.directory.equals("female")) return -1; ! else if (b.directory.equals("female")) return 1; ! return a.directory.compareTo(b.directory); } Index: M.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/M.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** M.java 22 Sep 2004 19:22:07 -0000 1.5 --- M.java 7 Oct 2004 14:13:07 -0000 1.6 *************** *** 492,500 **** // (they spray too much), get mad at them if (((targ.flags & (Defines.FL_FLY | Defines.FL_SWIM)) == (attacker.flags & (Defines.FL_FLY | Defines.FL_SWIM))) ! && (Lib.strcmp(targ.classname, attacker.classname) != 0) ! && (Lib.strcmp(attacker.classname, "monster_tank") != 0) ! && (Lib.strcmp(attacker.classname, "monster_supertank") != 0) ! && (Lib.strcmp(attacker.classname, "monster_makron") != 0) ! && (Lib.strcmp(attacker.classname, "monster_jorg") != 0)) { if (targ.enemy != null && targ.enemy.client != null) targ.oldenemy = targ.enemy; --- 492,500 ---- // (they spray too much), get mad at them if (((targ.flags & (Defines.FL_FLY | Defines.FL_SWIM)) == (attacker.flags & (Defines.FL_FLY | Defines.FL_SWIM))) ! && (!(targ.classname.equals(attacker.classname))) ! && (!(attacker.classname.equals("monster_tank"))) ! && (!(attacker.classname.equals("monster_supertank"))) ! && (!(attacker.classname.equals("monster_makron"))) ! && (!(attacker.classname.equals("monster_jorg")))) { if (targ.enemy != null && targ.enemy.client != null) targ.oldenemy = targ.enemy; |
From: Holger Z. <hz...@us...> - 2004-10-07 14:14:24
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25032/src/jake2/server Modified Files: SV_CCMDS.java Log Message: remove some unreferenced functions Index: SV_CCMDS.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_CCMDS.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SV_CCMDS.java 22 Sep 2004 19:22:12 -0000 1.12 --- SV_CCMDS.java 7 Oct 2004 14:13:07 -0000 1.13 *************** *** 656,660 **** dir = Cmd.Argv(1); ! if (Lib.strstr(dir, "..") || Lib.strstr(dir, "/") || Lib.strstr(dir, "\\")) { Com.Printf("Bad savedir.\n"); } --- 656,660 ---- dir = Cmd.Argv(1); ! if ( (dir.indexOf("..") > -1) || (dir.indexOf("/") > -1) || (dir.indexOf("\\") > -1)) { Com.Printf("Bad savedir.\n"); } *************** *** 719,726 **** dir = Cmd.Argv(1); ! if (Lib.strstr(dir, "..") || Lib.strstr(dir, "/") || Lib.strstr(dir, "\\")) { Com.Printf("Bad savedir.\n"); } ! Com.Printf("Saving game...\n"); --- 719,726 ---- dir = Cmd.Argv(1); ! if ( (dir.indexOf("..") > -1) || (dir.indexOf("/") > -1) || (dir.indexOf("\\") > -1)) { Com.Printf("Bad savedir.\n"); } ! Com.Printf("Saving game...\n"); |