don't let the timer get pushed down by other messages

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2974 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-11 23:47:27 +00:00
parent e5e49db810
commit d96e11f4c4
3 changed files with 15 additions and 5 deletions
+9 -3
View File
@@ -273,14 +273,20 @@ struct hudmessages : consolebuffer<hudline>
void addline(const char *sf)
{
consolebuffer<hudline>::addline(sf, totalmillis);
if(conlines.length() && conlines[0].type&HUDMSG_OVERWRITE)
{
conlines[0].millis = totalmillis;
conlines[0].type = HUDMSG_INFO;
s_strcpy(conlines[0].line, sf);
}
else consolebuffer<hudline>::addline(sf, totalmillis);
}
void editline(int type, const char *sf)
{
if(!conlines.length()) return;
if(conlines.length() && conlines[0].type==type)
if(conlines.length() && ((conlines[0].type&HUDMSG_TYPE)==(type&HUDMSG_TYPE) || conlines[0].type&HUDMSG_OVERWRITE))
{
conlines[0].millis = totalmillis;
conlines[0].type = type;
s_strcpy(conlines[0].line, sf);
}
else consolebuffer<hudline>::addline(sf, totalmillis).type = type;