When you see a pile of copper coins and you run towards it, you will stop next to it if it's a real pile of cash. If it's a mimic, you will stop 2 squares away from it...
This is caused by the following code in pathfind.c:
Here, hidden mimics should not abort running...
This is caused by the following code in pathfind.c:
Code:
/* Look at every soon to be newly adjacent square. */ for (i = -max; i <= max; i++) { /* New direction */ new_dir = cycle[chome[prev_dir] + i]; /* New location */ row = py + ddy[prev_dir] + ddy[new_dir]; col = px + ddx[prev_dir] + ddx[new_dir]; /* HACK: Ugh. Sometimes we come up with illegal bounds. This will * treat the symptom but not the disease. */ if (row >= DUNGEON_HGT || col >= DUNGEON_WID) continue; if (row < 0 || col < 0) continue; /* Visible monsters abort running */ if (cave->m_idx[row][col] > 0) { monster_type *m_ptr = cave_monster_at(cave, row, col); /* Visible monster */ if (m_ptr->ml) return (TRUE); } }
Comment