diff --git a/language.version b/language.version index 0b173b918..48f48f8bf 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1161 \cu(Sun Nov 17 16:24:53 CET 2024)\c-"; -SWWM_SHORTVER="\cw1.3pre r1161 \cu(2024-11-17 16:24:53)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1162 \cu(Tue Dec 3 09:53:07 CET 2024)\c-"; +SWWM_SHORTVER="\cw1.3pre r1162 \cu(2024-12-03 09:53:07)\c-"; diff --git a/zscript/hud/swwm_hud_messages.zsc b/zscript/hud/swwm_hud_messages.zsc index a230569c5..9e6ba3c9e 100644 --- a/zscript/hud/swwm_hud_messages.zsc +++ b/zscript/hud/swwm_hud_messages.zsc @@ -10,6 +10,7 @@ extend Class SWWMStatusBar PickupQueue.Clear(); midstr = ""; midtic = 0; + if ( midl ) midl.Destroy(); ntagstr = ""; ntagtic = 0; return; @@ -199,6 +200,13 @@ extend Class SWWMStatusBar midstr = msg; midtic = level.totaltime; midtype = bold?2:0; + if ( midl ) midl.Destroy(); + // don't forget to log to console, like gzdoom itself does + // (also, account for potential unterminated color escapes) + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY, + "----------------------------------------\n" + .."%s\c-\n" + .."----------------------------------------",msg); return true; } if ( (fnt == bigfont) || (fnt == originalbigfont) ) @@ -206,6 +214,13 @@ extend Class SWWMStatusBar midstr = msg; midtic = level.totaltime; midtype = bold?3:1; + if ( midl ) midl.Destroy(); + // don't forget to log to console, like gzdoom itself does + // (also, account for potential unterminated color escapes) + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY, + "----------------------------------------\n" + .."%s\c-\n" + .."----------------------------------------",msg); return true; } return false; @@ -335,10 +350,11 @@ extend Class SWWMStatusBar int col = (midtype&2)?msgmidcolor2:msgmidcolor; double curtime = (midtic+int(GameTicRate*con_midtime))-(level.totaltime+fractic); double alph = clamp(curtime/20.,0.,1.); - if ( !midl || (midsz != int(ss0.x*ssp)) ) + if ( !midl || (midsz != int(min(ss0.x,ss0.y/.5625)*ssp)) ) { if ( midl ) midl.Destroy(); - midl = mSmallFont.BreakLines(midstr,int(min(ss0.x,ss0.y/.5625)*ssp)); + midsz = int(min(ss0.x,ss0.y/.5625)*ssp); + midl = mSmallFont.BreakLines(midstr,midsz); } int h = mSmallFont.GetHeight(); int maxlen = 0;