total_friends = 0;
- for (m_idx = m_max - 1; m_idx >= 1; m_idx--)
+ for (m_idx = current_floor_ptr->m_max - 1; m_idx >= 1; m_idx--)
{
monster_type *m_ptr;
monster_race *r_ptr;
C_MAKE(who, current_floor_ptr->max_m_idx, MONSTER_IDX);
/* Process the monsters (backwards) */
- for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
+ for (pet_ctr = current_floor_ptr->m_max - 1; pet_ctr >= 1; pet_ctr--)
{
if (is_pet(¤t_floor_ptr->m_list[pet_ctr]))
who[max_pet++] = pet_ctr;
case PET_DISMISS: /* Dismiss pets */
{
/* Check pets (backwards) */
- for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
+ for (pet_ctr = current_floor_ptr->m_max - 1; pet_ctr >= 1; pet_ctr--)
{
/* Player has pet */
if (is_pet(¤t_floor_ptr->m_list[pet_ctr])) break;
if (p_ptr->pet_extra_flags & PF_PICKUP_ITEMS)
{
p_ptr->pet_extra_flags &= ~(PF_PICKUP_ITEMS);
- for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
+ for (pet_ctr = current_floor_ptr->m_max - 1; pet_ctr >= 1; pet_ctr--)
{
/* Access the monster */
m_ptr = ¤t_floor_ptr->m_list[pet_ctr];