diff options
Diffstat (limited to 'src/jake2/client')
-rw-r--r-- | src/jake2/client/M.java | 12 | ||||
-rw-r--r-- | src/jake2/client/Menu.java | 19 |
2 files changed, 15 insertions, 16 deletions
diff --git a/src/jake2/client/M.java b/src/jake2/client/M.java index 2ea0d01..602b222 100644 --- a/src/jake2/client/M.java +++ b/src/jake2/client/M.java @@ -2,7 +2,7 @@ * M.java * Copyright (C) 2003 * - * $Id: M.java,v 1.5 2004-09-22 19:22:07 salomo Exp $ + * $Id: M.java,v 1.6 2004-10-07 14:13:07 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -491,11 +491,11 @@ public final class M { // it's not a tank // (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)) { + && (!(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; targ.enemy = attacker; diff --git a/src/jake2/client/Menu.java b/src/jake2/client/Menu.java index ab3199f..761b5d8 100644 --- a/src/jake2/client/Menu.java +++ b/src/jake2/client/Menu.java @@ -2,7 +2,7 @@ * Menu.java * Copyright (C) 2004 * - * $Id: Menu.java,v 1.11 2004-10-04 12:50:37 hzi Exp $ + * $Id: Menu.java,v 1.12 2004-10-07 14:13:00 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -3729,8 +3729,7 @@ public final class Menu extends Key { static boolean IconOfSkinExists(String skin, String pcxfiles[], int npcxfiles) { - int i; - //char scratch[1024]; + String scratch; //strcpy(scratch, skin); @@ -3742,8 +3741,8 @@ public final class Menu extends Key { else scratch += "_i.pcx"; - for (i = 0; i < npcxfiles; i++) { - if (Lib.strcmp(pcxfiles[i], scratch) == 0) + for (int i = 0; i < npcxfiles; i++) { + if (pcxfiles[i].equals(scratch)) return true; } @@ -3899,17 +3898,17 @@ public final class Menu extends Key { /* * * sort by male, female, then alphabetical */ - if (Lib.strcmp(a.directory, "male") == 0) + if (a.directory.equals("male")) return -1; - else if (Lib.strcmp(b.directory, "male") == 0) + else if (b.directory.equals("male")) return 1; - if (Lib.strcmp(a.directory, "female") == 0) + if (a.directory.equals("female")) return -1; - else if (Lib.strcmp(b.directory, "female") == 0) + else if (b.directory.equals("female")) return 1; - return Lib.strcmp(a.directory, b.directory); + return a.directory.compareTo(b.directory); } static String handedness[] = { "right", "left", "center", null }; |