diff options
Diffstat (limited to 'src/jake2/client')
-rw-r--r-- | src/jake2/client/CL.java | 28 | ||||
-rw-r--r-- | src/jake2/client/CL_parse.java | 14 |
2 files changed, 22 insertions, 20 deletions
diff --git a/src/jake2/client/CL.java b/src/jake2/client/CL.java index ecf2c84..d6f5e2a 100644 --- a/src/jake2/client/CL.java +++ b/src/jake2/client/CL.java @@ -2,7 +2,7 @@ * CL.java * Copyright (C) 2004 * - * $Id: CL.java,v 1.14 2004-10-20 20:39:10 cawe Exp $ + * $Id: CL.java,v 1.15 2004-10-24 21:02:04 salomo Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -1130,26 +1130,24 @@ public final class CL { continue; } - int pos = Globals.cl.configstrings[Defines.CS_PLAYERSKINS - + i].indexOf('\\'); + int pos = Globals.cl.configstrings[Defines.CS_PLAYERSKINS + i].indexOf('\\'); + if (pos != -1) pos++; else 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); - - pos = model.indexOf('/'); - - if (pos == -1) - pos = model.indexOf('\\'); - - if (pos != -1) { - skin = model.substring(pos + 1); - } else - skin = ""; - + .substring(pos, pos2); + + skin = Globals.cl.configstrings[Defines.CS_PLAYERSKINS + i].substring(pos2 + 1); + switch (n) { case 0: // model fn = "players/" + model + "/tris.md2"; diff --git a/src/jake2/client/CL_parse.java b/src/jake2/client/CL_parse.java index 9e8001d..ad447c2 100644 --- a/src/jake2/client/CL_parse.java +++ b/src/jake2/client/CL_parse.java @@ -2,7 +2,7 @@ * CL_parse.java * Copyright (C) 2004 * - * $Id: CL_parse.java,v 1.10 2004-10-21 01:50:49 cawe Exp $ + * $Id: CL_parse.java,v 1.11 2004-10-24 21:02:05 salomo Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -97,14 +97,18 @@ public class CL_parse { name = DownloadFileName(Globals.cls.downloadtempname); fp = Lib.fopen(name, "r+b"); - if (fp != null) { // it exists + + if (fp != null) { + + // it exists long len = 0; try { len = fp.length(); - } catch (IOException e) { + } + catch (IOException e) { } - ; + Globals.cls.download = fp; @@ -116,7 +120,7 @@ public class CL_parse { } else { Globals.cls.downloadname = Globals.cls.downloadname; - Com.Printf("Downloading " + Globals.cls.downloadname + "\n"); + Com.Printf("CheckOrDownloading " + Globals.cls.downloadname + "\n"); MSG.WriteByte(Globals.cls.netchan.message, Defines.clc_stringcmd); MSG.WriteString(Globals.cls.netchan.message, "download " + Globals.cls.downloadname); |