Fix UFO hum level clamping

This commit is contained in:
AJ Martinez 2023-01-19 15:56:36 -07:00
parent 3165deb43b
commit 0eba5c5a74

View file

@ -433,7 +433,7 @@ static void UFOUpdateSound(mobj_t *ufo) {
if (!UFOEmeraldChase(ufo) && !UFOHumPlaying(ufo))
{
healthlevel = max(min(healthlevel, 1), maxhum);
healthlevel = min(max(healthlevel, 1), maxhum);
S_StartSound(ufo, hums[maxhum - healthlevel]);
}
}