View Single Post
Old October 20, 2017, 10:15   #1
PowerWyrm's Avatar
Join Date: Apr 2008
Posts: 2,762
PowerWyrm is on a distinguished road
Tracking an annoying monster message bug

I'm experiencing an annoying bug in PWMAngband that I tried to track for a long time now without finding the cause. Sometimes, after a while or even when entering a new level, I get monster messages displayed out of their context. For example, I get "You hear a scream of agony!" immediately upon entering a level, or sometimes "The orc flees in terror!" when there's no orc around... and looking at the message log, I find that I've killed an orc a while back with "The orc screams in agony. The orc dies." messages displayed.

Looking at the code in mon-msg.c, I see little differences with the code in V.

1) stack_message(): I only check the last message, I'll change that to what is done in V
2) show_monster_messages(): I added a check if the message count is not zero, but that can probably go away

That's pretty much it. There's a small bug in what_delay() which only checks for DIE and DESTROYED codes to delay the death messages, when it should check for MSG_KILL flag, so I'll fix that and see if it changes anything. Then I can look at all add_monster_message() calls to check the delay parameter. Maybe I'm missing something, like how and when show_monster_messages() is called.

To all V players around, did someone catch the same problem during a normal Angband game? I don't recall seeing this during my games, but it seems to happen very randomly.
PWMAngband variant maintainer - check (or to learn more about this new variant!
PowerWyrm is offline   Reply With Quote