mirror of https://github.com/ZDoom/gzdoom.git
- 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
|
@ -1757,9 +1757,10 @@ static int S_LookupPlayerSound (int classidx, int gender, FSoundID refid)
|
||||||
{
|
{
|
||||||
int g;
|
int g;
|
||||||
|
|
||||||
for (g = 0; g < GENDER_MAX && listidx == 0xffff; ++g)
|
for (g = 0; g < GENDER_MAX; ++g)
|
||||||
{
|
{
|
||||||
listidx = PlayerClassLookups[classidx].ListIndex[g];
|
listidx = PlayerClassLookups[classidx].ListIndex[g];
|
||||||
|
if (listidx != 0xffff) break;
|
||||||
}
|
}
|
||||||
if (g == GENDER_MAX)
|
if (g == GENDER_MAX)
|
||||||
{ // No sounds defined at all for this class (can this happen?)
|
{ // No sounds defined at all for this class (can this happen?)
|
||||||
|
|
Loading…
Reference in New Issue