extern int lore_do_probe(player_type *player_ptr, MONRACE_IDX r_idx);
extern void lore_treasure(player_type *player_ptr, MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
extern void update_monster(player_type *subject_ptr, MONSTER_IDX m_idx, bool full);
-extern void update_monsters(bool full);
+extern void update_monsters(player_type *player_ptr, bool full);
extern bool multiply_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
extern bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode);
extern bool summon_named_creature(player_type *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode);
/*!
+ * @param player_ptr プレーヤーへの参照ポインタ
* @brief 単純に生存している全モンスターの更新処理を行う / This function simply updates all the (non-dead) monsters (see above).
* @param full 距離更新を行うならtrue
* @return なし
*/
-void update_monsters(bool full)
+void update_monsters(player_type *player_ptr, bool full)
{
MONSTER_IDX i;
/* Update each (live) monster */
- floor_type *floor_ptr = p_ptr->current_floor_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (i = 1; i < floor_ptr->m_max; i++)
{
monster_type *m_ptr = &floor_ptr->m_list[i];
if (!monster_is_valid(m_ptr)) continue;
- update_monster(p_ptr, i, full);
+ update_monster(player_ptr, i, full);
}
}
{
creature_ptr->update &= ~(PU_DISTANCE);
- /* Still need to call update_monsters(FALSE) after update_mon_lite() */
- /* creature_ptr->update &= ~(PU_MONSTERS); */
-
- update_monsters(TRUE);
+ update_monsters(creature_ptr, TRUE);
}
if (creature_ptr->update & (PU_MON_LITE))
if (creature_ptr->update & (PU_MONSTERS))
{
creature_ptr->update &= ~(PU_MONSTERS);
- update_monsters(FALSE);
+ update_monsters(creature_ptr, FALSE);
}
}