Difference for server/monster.c from version 1.15 to 1.16


version 1.15 version 1.16
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_monster_c =   * static char *rcsid_monster_c =
  *    "$Id: monster.c,v 1.15 2001/01/26 07:23:26 cvs Exp $";   *    "$Id: monster.c,v 1.16 2001/02/11 09:12:14 cvs Exp $";
  */   */
   
 /*  /*
Line 113
 
Line 113
   
 int check_wakeup(object *op, object *enemy) {  int check_wakeup(object *op, object *enemy) {
   int radius = op->stats.Wis>MIN_MON_RADIUS?op->stats.Wis:MIN_MON_RADIUS;    int radius = op->stats.Wis>MIN_MON_RADIUS?op->stats.Wis:MIN_MON_RADIUS;
   objectlink *ol;  
   
   /* blinded monsters can only find nearby objects to attack */    /* blinded monsters can only find nearby objects to attack */
   if(QUERY_FLAG(op, FLAG_BLIND) && !QUERY_FLAG(op, FLAG_SEE_INVISIBLE))     if(QUERY_FLAG(op, FLAG_BLIND) && !QUERY_FLAG(op, FLAG_SEE_INVISIBLE))
Line 133
 
Line 132
   }     }
 #endif  #endif
   else if(!QUERY_FLAG(op,FLAG_SLEEP)) return 1;    else if(!QUERY_FLAG(op,FLAG_SLEEP)) return 1;
   
 #if 0  
     /* We already have an enemy, so why bother going through all of this?  
      * not only is it inefficient, it seems pretty pointless.  
      */  
   for(ol=first_friendly_object;ol!=NULL;ol=ol->next)  
     if(ol->ob->map==op->map&&  
        (QUERY_FLAG(ol->ob,FLAG_STEALTH)?(abs(ol->ob->x-op->x)<radius/2+1 &&  
                          abs(ol->ob->y-op->y)<radius/2+1):  
                         (abs(ol->ob->x-op->x)<radius&&  
                          abs(ol->ob->y-op->y)<radius)))  
     {  
       CLEAR_FLAG(op,FLAG_SLEEP);  
       return 1;  
     }  
 #else  
     /* enemy should already be on this map, so don't really need to check      /* enemy should already be on this map, so don't really need to check
      * for that.       * for that.
      */       */
Line 160
 
Line 143
      return 1;       return 1;
  }   }
     }      }
 #endif  
   return 0;    return 0;
 }  }
   


Legend:
line(s) removed in v.1.15 
line(s) changed
 line(s) added in v.1.16

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:38