fix MBF21 GetSoundArg off-by-one: sound indices are 1-indexed in args because Killough

This commit is contained in:
Xaser Acheron 2022-01-11 10:55:34 -06:00 committed by Christoph Oelckers
parent e6c6471e2f
commit 97859fd608
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ struct MBFParamState
int GetSoundArg(int i, int def = 0)
{
int num = argsused & (1 << i) ? (int)args[i] : def;
if (num > 0 && num < int(SoundMap.Size())) return SoundMap[num];
if (num > 0 && num <= int(SoundMap.Size())) return SoundMap[num-1];
return 0;
}