Changeset 1441 for trunk

Show
Ignore:
Timestamp:
06/13/09 16:00:39 (15 months ago)
Author:
magnate
Message:

Give up and use projectable() to show ESP'd monsters correctly and fix #875.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/monster/monster2.c

    r1440 r1441  
    618618                if (!list[m_ptr->r_idx].count) type_count++; 
    619619                 
    620                 /* Check for LOS */ 
    621                 if (m_ptr->mflag & (MFLAG_VIEW)) 
     620                /* Check for LOS 
     621                 * Hack - we should use (m_ptr->mflag & (MFLAG_VIEW)) here, 
     622                 * but this does not catch monsters detected by ESP which are 
     623                 * targetable, so we cheat and use projectable() instead  
     624                 */ 
     625                if (projectable(p_ptr->py, p_ptr->px, m_ptr->fy, m_ptr->fx, 
     626                        PROJECT_NONE)) 
    622627                { 
    623628                        /* Increment the total number of in-LOS monsters */