For HUD messages redundancy check, compare all messages and check if message already printed and is a typical 'ALREADY HAVE' message - waste them if so

This commit is contained in:
zicodxx 2007-10-28 21:34:20 +00:00
parent 453cf2d609
commit cf27a22701
2 changed files with 2 additions and 1 deletions

View file

@ -3,6 +3,7 @@ D2X-Rebirth Changelog
20071028
--------
arch/ogl/ogl.c, include/args.h, main/collide.c, main/fuelcen.c, main/game.c, main/gamecntl.c, main/gameseq.c, main/gauges.c, main/hud.c, main/inferno.c, main/laser.c, main/network.c, main/powerup.c, misc/args.c: Fixed problems with GameTime wraparound - delay sounds, cloak, invulnerability, ping; Added debug key to Reset GameTime for testing; Removed -gl_vidmem; Some HUD message redundancy
main/hud.c: For HUD messages redundancy check, compare all messages and check if message already printed and is a typical "ALREADY HAVE" message - waste them if so
20071018
--------

View file

@ -262,7 +262,7 @@ int HUD_init_message_va(char * format, va_list args)
// if many redundant messages at the same time, just block them all together
// we probably want at least all visible once, but this isn't worth the work
for (i=0; i<=HUD_nmessages; i++)
if (last_message && (!strcmp(&HUD_messages[i][0], message)))
if (last_message && !strcmp(&HUD_messages[i][0],message) && (!strnicmp("You already",message,11) || !stricmp("super laser maxed out!",message)))
return 0;
t=time(NULL);