モンスターが消えてしまうバグを修正. また, グリッドのm_idxの移動操作は
"新しい位置にm_idxを入れて古い位置は0にする" ではなく "古い位置を0に
して新しい位置にm_idxを入れる" 順序に直した.
m_ptr = &m_list[m_idx];
- /* Update the new location */
- cave[ny][nx].m_idx = m_idx;
-
/* Update the old location */
cave[oy][ox].m_idx = 0;
+ /* Update the new location */
+ cave[ny][nx].m_idx = m_idx;
+
/* Move the monster */
m_ptr->fy = ny;
m_ptr->fx = nx;
{
int m_idx = cave[yy][xx].m_idx;
- /* Update the new location */
- cave[sy][sx].m_idx = m_idx;
-
/* Update the old location */
cave[yy][xx].m_idx = 0;
+ /* Update the new location */
+ cave[sy][sx].m_idx = m_idx;
+
/* Move the monster */
m_ptr->fy = sy;
m_ptr->fx = sx;
/* Sound */
sound(SOUND_TPOTHER);
- /* Update the new location */
- cave[ny][nx].m_idx = m_idx;
-
/* Update the old location */
cave[oy][ox].m_idx = 0;
+ /* Update the new location */
+ cave[ny][nx].m_idx = m_idx;
+
/* Move the monster */
m_ptr->fy = ny;
m_ptr->fx = nx;
/* Sound */
sound(SOUND_TPOTHER);
- /* Update the new location */
- cave[ny][nx].m_idx = m_idx;
-
/* Update the old location */
cave[oy][ox].m_idx = 0;
+ /* Update the new location */
+ cave[ny][nx].m_idx = m_idx;
+
/* Move the monster */
m_ptr->fy = ny;
m_ptr->fx = nx;