[3.3.x] Crash when leaving a level while hallucinating

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerWyrm
    Prophet
    • Apr 2008
    • 2986

    [3.3.x] Crash when leaving a level while hallucinating

    The problem is in the following code in grid_data_as_text():

    Code:
    	/* If there's a monster */
    	if (g->m_idx > 0 && !is_mimicking(g->m_idx))
    	{
    		if (g->hallucinate)
    		{
    			/* Just pick a random monster to display. */
    			hallucinatory_monster(&a, &c);
    		}
    		else
    		{
    ...
    When hallucinating, map_info sets g->m_idx to 1, so the "is_mimicking" check is misplaced. It should be:

    Code:
        /* If there's a monster */
        if (g->m_idx > 0)
        {
            if (g->hallucinate)
            {
                /* Just pick a random monster to display. */
                hallucinatory_monster(&a, &c);
            }
            else if (!is_mimicking(g->m_idx))
            {
    ...
    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Excellent, thanks for spotting. I've fixed this in my repo - I'm waiting for the fix to the confusion/Study message bug before pushing to master and building a new dev version.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

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