mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-18 02:21:47 +00:00
P_AddWadFile: for both WADs and pk3s, if a sound is found to replace an existing sound, don't go on looking for more with the same name (since there shouldn't be any)
This commit is contained in:
parent
03020036d4
commit
0e8db59f4b
1 changed files with 12 additions and 7 deletions
|
@ -3163,6 +3163,7 @@ void P_LoadSoundsRange(UINT16 wadnum, UINT16 first, UINT16 num)
|
|||
CONS_Debug(DBG_SETUP, "Sound %.8s replaced\n", lumpinfo->name);
|
||||
|
||||
I_FreeSfx(&S_sfx[j]);
|
||||
break; // there shouldn't be two sounds with the same name, so stop looking
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3290,7 +3291,9 @@ boolean P_AddWadFile(const char *wadfilename)
|
|||
name = lumpinfo->name;
|
||||
if (name[0] == 'D')
|
||||
{
|
||||
if (name[1] == 'S') for (j = 1; j < NUMSFX; j++)
|
||||
if (name[1] == 'S')
|
||||
{
|
||||
for (j = 1; j < NUMSFX; j++)
|
||||
{
|
||||
if (S_sfx[j].name && !strnicmp(S_sfx[j].name, name + 2, 6))
|
||||
{
|
||||
|
@ -3301,6 +3304,8 @@ boolean P_AddWadFile(const char *wadfilename)
|
|||
I_FreeSfx(&S_sfx[j]);
|
||||
|
||||
sreplaces++;
|
||||
break; // there shouldn't be two sounds with the same name, so stop looking
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (name[1] == '_')
|
||||
|
|
Loading…
Reference in a new issue