int attempts = 500;
int dis = 2;
bool look = TRUE;
- cave_type *c_ptr;
monster_type *m_ptr = &m_list[m_idx];
/* Try several locations */
for (i = 0; i < 500; i++)
{
+ cave_type *c_ptr;
+
/* Pick a (possibly illegal) location */
while (1)
{
sound(SOUND_TPOTHER);
/* Update the new location */
- c_ptr->m_idx = m_idx;
+ cave[ny][nx].m_idx = m_idx;
/* Update the old location */
cave[oy][ox].m_idx = 0;
void teleport_level(int m_idx)
{
bool go_up;
- monster_type *m_ptr;
char m_name[160];
bool see_m = TRUE;
}
else /* To monster */
{
- m_ptr = &m_list[m_idx];
+ monster_type *m_ptr = &m_list[m_idx];
/* Get the monster name (or "it") */
monster_desc(m_name, m_ptr, 0);
/* Monster level teleportation is simple deleting now */
if (m_idx > 0)
{
+ monster_type *m_ptr = &m_list[m_idx];
+
/* Check for quest completion */
check_quest_completion(m_ptr);