Add critical messages and obituaries to message log.

This commit is contained in:
Mari the Deer 2023-03-07 08:11:15 +01:00
commit 91e21acd8f
4 changed files with 26 additions and 9 deletions

View file

@ -34,14 +34,23 @@ Class SWWMFullHistory : SWWMStaticThinker
// push a map change label
m = new("MsgLine");
m.str = level.levelname;
m.type = -1;
m.type = -1; // hopefully this won't be used by actual messages
fh.lastmap = level.mapname;
fh.msg.Push(m);
}
// if the last added line is identical to this one, update it with a repetition marker
int last = fh.msg.Size()-1;
if ( (fh.msg[last].str == str) && (fh.msg[last].type == type) )
{
fh.msg[last].tic = tic;
fh.msg[last].rep++;
return;
}
m = new("MsgLine");
m.str = str;
m.tic = tic;
m.type = type;
m.rep = 1;
fh.msg.Push(m);
}
}