- brought back text length check for 'type on' HUD message

https://forum.zdoom.org/viewtopic.php?t=64569
This commit is contained in:
alexey.lysiuk 2019-05-04 11:13:59 +03:00
parent a6515765c8
commit dbf06fc9ca

View file

@ -749,7 +749,7 @@ void DHUDMessageTypeOnFadeOut::Serialize(FSerializer &arc)
bool DHUDMessageTypeOnFadeOut::Tick ()
{
if (!Super::Tick ())
if (LineLen > 0 && !Super::Tick ())
{
if (State == 3)
{
@ -820,7 +820,7 @@ void DHUDMessageTypeOnFadeOut::ScreenSizeChanged ()
if (State == 3)
{
CurrLine = 0;
LineLen = (int)Lines[0].Text.Len();
LineLen = Lines.Size() > 0 ? (int)Lines[0].Text.Len() : 0;
Tics = (int)(charCount * TypeOnTime) - 1;
Tick ();
}