Monster recall bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • t4nk
    Swordsman
    • May 2016
    • 336

    Monster recall bug

    Another thing I noticed while playing master. Sorry if that's old news... Here's how to reproduce:
    Make sure that 'auto more' is off (the bug is easier to notice that way). Find a monster, and press control-x and quit the game. Load it again. As the very first action, press l (or x, with roguelike keyset). Navigate to the monster, press r for recall. The -more- part of the prompt appears, like that: "You see a Fruit bat (unhurt, asleep)-more- 1 E.". Press escape a couple times, and cursor appears in 0, 0 cell of the main term, the rest of row 0 is empty. That happens when the user invokes do_cmd_look() as the first action after loading a level (and maybe in other situations).
    The cause of the bug is lore_show_interactive() calling event_signal(EVENT_MESSAGE_FLUSH), which calls message_flush(), while message_column is not 0:
    Code:
        if (message_column) {
            /* Print pending messages */
            if (Term)
                msg_flush(message_column);
    As a fix, I added msg_flag = false; to lore_show_interactive() (immediately before event_signal()), which solved the problem. That's probably just a hack
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9648

    #2
    Thanks, this might also fix some other low-level issues with -more- prompts that I haven't bothered to track down.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9648

      #3
      I believe the root cause of this was actually a terrible hack I had done, where msg_flag was set to false for the duration of targeting to stop animations happening.

      I've now removed this hack and implemented an explicit disallowing of animations, and your bug is gone.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎