• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisionac22ca30c94c957b8c9c69c7030956a41bb78625 (tree)
Time2004-01-15 21:26:21
Authornothere <nothere@0568...>
Commiternothere

Log Message

モンスターのテレポートバックやテレポートで候補位置が同じだった場合に
モンスターが消えてしまうバグを修正. また, グリッドのm_idxの移動操作は
"新しい位置にm_idxを入れて古い位置は0にする" ではなく "古い位置を0に
して新しい位置にm_idxを入れる" 順序に直した.

Change Summary

Incremental Difference

--- a/src/floors.c
+++ b/src/floors.c
@@ -707,12 +707,12 @@ static void get_out_monster(void)
707707
708708 m_ptr = &m_list[m_idx];
709709
710- /* Update the new location */
711- cave[ny][nx].m_idx = m_idx;
712-
713710 /* Update the old location */
714711 cave[oy][ox].m_idx = 0;
715712
713+ /* Update the new location */
714+ cave[ny][nx].m_idx = m_idx;
715+
716716 /* Move the monster */
717717 m_ptr->fy = ny;
718718 m_ptr->fx = nx;
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -5701,12 +5701,12 @@ msg_format("%^s
57015701 {
57025702 int m_idx = cave[yy][xx].m_idx;
57035703
5704- /* Update the new location */
5705- cave[sy][sx].m_idx = m_idx;
5706-
57075704 /* Update the old location */
57085705 cave[yy][xx].m_idx = 0;
57095706
5707+ /* Update the new location */
5708+ cave[sy][sx].m_idx = m_idx;
5709+
57105710 /* Move the monster */
57115711 m_ptr->fy = sy;
57125712 m_ptr->fx = sx;
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -127,12 +127,12 @@ bool teleport_away(int m_idx, int dis, bool dec_valour, bool passive)
127127 /* Sound */
128128 sound(SOUND_TPOTHER);
129129
130- /* Update the new location */
131- cave[ny][nx].m_idx = m_idx;
132-
133130 /* Update the old location */
134131 cave[oy][ox].m_idx = 0;
135132
133+ /* Update the new location */
134+ cave[ny][nx].m_idx = m_idx;
135+
136136 /* Move the monster */
137137 m_ptr->fy = ny;
138138 m_ptr->fx = nx;
@@ -230,12 +230,12 @@ void teleport_monster_to(int m_idx, int ty, int tx, int power, bool passive)
230230 /* Sound */
231231 sound(SOUND_TPOTHER);
232232
233- /* Update the new location */
234- cave[ny][nx].m_idx = m_idx;
235-
236233 /* Update the old location */
237234 cave[oy][ox].m_idx = 0;
238235
236+ /* Update the new location */
237+ cave[ny][nx].m_idx = m_idx;
238+
239239 /* Move the monster */
240240 m_ptr->fy = ny;
241241 m_ptr->fx = nx;
Show on old repository browser