Strip newline on messages directly, rather than when appending.
This commit is contained in:
parent
4d1c4eed5b
commit
aa8e152e0f
2 changed files with 6 additions and 4 deletions
|
|
@ -859,12 +859,14 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
// ignore outside of levels
|
||||
if ( gamestate != GS_LEVEL ) return false;
|
||||
// strip trailing newline (all Printf type messages have this)
|
||||
outline.DeleteLastCharacter();
|
||||
// append chat messages to full history
|
||||
if ( (printlevel == PRINT_CHAT) || (printlevel == PRINT_TEAMCHAT) )
|
||||
EventHandler.SendNetworkEvent("swwmstoremessage."..outline.Left(outline.Length()-1),level.totaltime,printlevel,consoleplayer);
|
||||
EventHandler.SendNetworkEvent("swwmstoremessage."..outline,level.totaltime,printlevel,consoleplayer);
|
||||
if ( (printlevel < PRINT_LOW) || (printlevel > PRINT_TEAMCHAT) ) return true; // we couldn't care less about these
|
||||
let m = new("MsgLine");
|
||||
m.str = outline.Left(outline.Length()-1); // strip newline
|
||||
m.str = outline;
|
||||
m.type = printlevel;
|
||||
m.tic = level.totaltime;
|
||||
m.rep = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue