mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fixed: The player sound lookup would fail if a sound was only available for the last gender in the list.
This is an ancient bug, but it never registered before - only after making 'other' the default gender for nonsense input it became apparent.
This commit is contained in:
parent
845141d9af
commit
9ba0e7b783
1 changed files with 2 additions and 1 deletions
|
@ -1757,9 +1757,10 @@ static int S_LookupPlayerSound (int classidx, int gender, FSoundID refid)
|
|||
{
|
||||
int g;
|
||||
|
||||
for (g = 0; g < GENDER_MAX && listidx == 0xffff; ++g)
|
||||
for (g = 0; g < GENDER_MAX; ++g)
|
||||
{
|
||||
listidx = PlayerClassLookups[classidx].ListIndex[g];
|
||||
if (listidx != 0xffff) break;
|
||||
}
|
||||
if (g == GENDER_MAX)
|
||||
{ // No sounds defined at all for this class (can this happen?)
|
||||
|
|
Loading…
Reference in a new issue