From: Rene S. <sa...@us...> - 2004-10-24 21:02:16
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18445/src/jake2/client Modified Files: CL.java CL_parse.java Log Message: Player Skin Download bug fixed Index: CL_parse.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_parse.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CL_parse.java 21 Oct 2004 01:50:49 -0000 1.10 --- CL_parse.java 24 Oct 2004 21:02:05 -0000 1.11 *************** *** 98,109 **** fp = Lib.fopen(name, "r+b"); ! if (fp != null) { // it exists long len = 0; try { len = fp.length(); ! } catch (IOException e) { } ! ; Globals.cls.download = fp; --- 98,113 ---- fp = Lib.fopen(name, "r+b"); ! ! if (fp != null) { ! ! // it exists long len = 0; try { len = fp.length(); ! } ! catch (IOException e) { } ! Globals.cls.download = fp; *************** *** 117,121 **** Globals.cls.downloadname = Globals.cls.downloadname; ! Com.Printf("Downloading " + Globals.cls.downloadname + "\n"); MSG.WriteByte(Globals.cls.netchan.message, Defines.clc_stringcmd); MSG.WriteString(Globals.cls.netchan.message, "download " --- 121,125 ---- Globals.cls.downloadname = Globals.cls.downloadname; ! Com.Printf("CheckOrDownloading " + Globals.cls.downloadname + "\n"); MSG.WriteByte(Globals.cls.netchan.message, Defines.clc_stringcmd); MSG.WriteString(Globals.cls.netchan.message, "download " Index: CL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CL.java 20 Oct 2004 20:39:10 -0000 1.14 --- CL.java 24 Oct 2004 21:02:04 -0000 1.15 *************** *** 1131,1136 **** } ! int pos = Globals.cl.configstrings[Defines.CS_PLAYERSKINS ! + i].indexOf('\\'); if (pos != -1) pos++; --- 1131,1136 ---- } ! int pos = Globals.cl.configstrings[Defines.CS_PLAYERSKINS + i].indexOf('\\'); ! if (pos != -1) pos++; *************** *** 1138,1154 **** pos = 0; model = Globals.cl.configstrings[Defines.CS_PLAYERSKINS + i] ! .substring(pos); ! ! pos = model.indexOf('/'); ! ! if (pos == -1) ! pos = model.indexOf('\\'); ! ! if (pos != -1) { ! skin = model.substring(pos + 1); ! } else ! skin = ""; ! switch (n) { case 0: // model --- 1138,1152 ---- pos = 0; + int pos2 = Globals.cl.configstrings[Defines.CS_PLAYERSKINS + i].indexOf('\\', pos); + + if (pos2 == -1) + pos2 = Globals.cl.configstrings[Defines.CS_PLAYERSKINS + i].indexOf('/', pos); + + model = Globals.cl.configstrings[Defines.CS_PLAYERSKINS + i] ! .substring(pos, pos2); ! ! skin = Globals.cl.configstrings[Defines.CS_PLAYERSKINS + i].substring(pos2 + 1); ! switch (n) { case 0: // model |