- changed subtitle duration to last at least 7 seconds, even for shorter sounds so that there is sufficient time to read them.

This commit is contained in:
Christoph Oelckers 2019-07-26 20:18:01 +02:00 committed by drfrag
parent c7516a0fc5
commit 6a647afff1

View file

@ -498,7 +498,8 @@ void player_t::SetSubtitle(int num, FSoundID soundid)
if (text != nullptr)
{
SubtitleText = lumpname;
SubtitleCounter = soundid == 0 ? 7 * TICRATE : S_GetMSLength(soundid) * TICRATE / 1000;
int sl = soundid == 0 ? 7000 : std::max<int>(7000, S_GetMSLength(soundid));
SubtitleCounter = sl * TICRATE / 1000;
}
}