Fix color escapes of dialogue text on console.

This commit is contained in:
Mari the Deer 2023-06-21 11:38:26 +02:00
commit 98b141d5bc
4 changed files with 15 additions and 4 deletions

View file

@ -150,7 +150,12 @@ extend Class SWWMHandler
{
let l = SWWMOneLiner.Make(oneliner,onelinerspan);
StatusBar.AttachMessage(l,-3473);
if ( swwm_voicelog ) Console.PrintfEx(PRINT_CHAT|PRINT_NONOTIFY,"\cd"..(multiplayer?players[consoleplayer].GetUserName():"Demo").."\c*: "..StringTable.Localize(oneliner).."\c*");
if ( swwm_voicelog )
{
String txt = StringTable.Localize(oneliner);
txt.Replace("\c-","\c*"); // fix color reset escapes
Console.PrintfEx(PRINT_CHAT|PRINT_NONOTIFY,"\cd"..(multiplayer?players[consoleplayer].GetUserName():"Demo").."\c*: "..txt.."\c*");
}
}
SendNetworkEvent("swwmremotelinertxt."..oneliner,consoleplayer,onelinerlevel);
}