From: Carsten W. <ca...@us...> - 2004-10-21 02:46:05
|
Update of /cvsroot/jake2/jake2/src/jake2/sound/joal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22292/src/jake2/sound/joal Modified Files: JOALSoundImpl.java Log Message: selection of sexed sounds are now correct Index: JOALSoundImpl.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/joal/JOALSoundImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** JOALSoundImpl.java 21 Oct 2004 01:51:45 -0000 1.6 --- JOALSoundImpl.java 21 Oct 2004 02:45:55 -0000 1.7 *************** *** 630,652 **** sfx = FindName(sexedFilename, false); ! if (sfx == null) { ! // no, so see if it exists ! int fileLength = FS.FileLength(sexedFilename.substring(1)); ! if (fileLength > 0) { ! // yes, register it ! sfx = RegisterSound(sexedFilename); ! } else if (model.equalsIgnoreCase("female")) { ! // retry it with female pak-file sounds ! String femaleFilename = "player/female/" + base.substring(1); ! sfx = AliasName(sexedFilename, femaleFilename); ! } else { ! // no chance, revert to the male sound in the pak0.pak ! String maleFilename = "player/male/" + base.substring(1); ! sfx = AliasName(sexedFilename, maleFilename); ! } } ! return sfx; } - static sfx_t[] known_sfx = new sfx_t[MAX_SFX]; --- 630,653 ---- sfx = FindName(sexedFilename, false); ! if (sfx != null) return sfx; ! ! // ! // fall back strategies ! // ! // not found , so see if it exists ! if (FS.FileLength(sexedFilename.substring(1)) > 0) { ! // yes, register it ! return RegisterSound(sexedFilename); } ! // try it with the female sound in the pak0.pak ! if (model.equalsIgnoreCase("female")) { ! String femaleFilename = "player/female/" + base.substring(1); ! if (FS.FileLength("sound/" + femaleFilename) > 0) ! return AliasName(sexedFilename, femaleFilename); ! } ! // no chance, revert to the male sound in the pak0.pak ! String maleFilename = "player/male/" + base.substring(1); ! return AliasName(sexedFilename, maleFilename); } static sfx_t[] known_sfx = new sfx_t[MAX_SFX]; |