Tweak ProcessMidPrint so it doesn't spam duplicate messages to console.
This commit is contained in:
parent
42b3a84bcf
commit
7b15b30cfa
2 changed files with 18 additions and 2 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1163 \cu(Mon Jan 13 13:43:21 CET 2025)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1163 \cu(2025-01-13 13:43:21)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1164 \cu(Wed Jan 15 13:44:56 CET 2025)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1164 \cu(2025-01-15 13:44:56)\c-";
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ extend Class SWWMStatusBar
|
|||
Console.PrintfEx(PRINT_CHAT,"\cuAI Mainframe\c*: "..msg.."\c*");
|
||||
return true;
|
||||
}
|
||||
String lastmidstr = midstr;
|
||||
if ( !fnt || (fnt == smallfont) )
|
||||
{
|
||||
midstr = msg;
|
||||
|
|
@ -203,6 +204,8 @@ extend Class SWWMStatusBar
|
|||
if ( midl ) midl.Destroy();
|
||||
// don't forget to log to console, like gzdoom itself does
|
||||
// (also, account for potential unterminated color escapes)
|
||||
// PS: avoid duplicate message spam, too
|
||||
if ( msg == lastmidstr ) return true;
|
||||
Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,
|
||||
"----------------------------------------\n"
|
||||
.."%s\c-\n"
|
||||
|
|
@ -217,6 +220,8 @@ extend Class SWWMStatusBar
|
|||
if ( midl ) midl.Destroy();
|
||||
// don't forget to log to console, like gzdoom itself does
|
||||
// (also, account for potential unterminated color escapes)
|
||||
// PS: avoid duplicate message spam, too
|
||||
if ( msg == lastmidstr ) return true;
|
||||
Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,
|
||||
"----------------------------------------\n"
|
||||
.."%s\c-\n"
|
||||
|
|
@ -291,6 +296,17 @@ extend Class SWWMStatusBar
|
|||
MainQueue.Delete(i);
|
||||
i--;
|
||||
}
|
||||
if ( (midstr != "") && ((midtic+int(GameTicRate*con_midtime)) < level.totaltime) )
|
||||
{
|
||||
midstr = "";
|
||||
midtic = 0;
|
||||
if ( midl ) midl.Destroy();
|
||||
}
|
||||
if ( (ntagstr != "") && ((ntagtic+70) < level.totaltime) )
|
||||
{
|
||||
ntagstr = "";
|
||||
ntagtic = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawPickups()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue