Difference for server/pets.c from version 1.39 to 1.40


version 1.39 version 1.40
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_pets_c =   * static char *rcsid_pets_c =
  *    "$Id: pets.c,v 1.39 2005/11/16 08:16:09 mwedel Exp $";   *    "$Id: pets.c,v 1.40 2005/12/10 14:27:10 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 44
 
Line 44
     sint16 x,y;      sint16 x,y;
     mapstruct *nm;      mapstruct *nm;
     int search_arr[SIZEOFFREE];      int search_arr[SIZEOFFREE];
       int mflags;
   
     attacker = pet->attacked_by; /*pointer to attacking enemy*/      attacker = pet->attacked_by; /*pointer to attacking enemy*/
     pet->attacked_by = NULL;     /*clear this, since we are dealing with it*/      pet->attacked_by = NULL;     /*clear this, since we are dealing with it*/
Line 111
 
Line 112
         y = owner->y + freearr_y[search_arr[i]];          y = owner->y + freearr_y[search_arr[i]];
  nm = owner->map;   nm = owner->map;
  /* Only look on the space if there is something alive there. */   /* Only look on the space if there is something alive there. */
  if (get_map_flags(nm, &nm, x, y, &x, &y) & P_IS_ALIVE) {   mflags = get_map_flags(nm, &nm, x, y, &x, &y);
    if (!(mflags & P_OUT_OF_MAP) && mflags & P_IS_ALIVE) {
      for (tmp = get_map_ob(nm, x, y); tmp != NULL; tmp = tmp->above) {       for (tmp = get_map_ob(nm, x, y); tmp != NULL; tmp = tmp->above) {
  object *tmp2 = tmp->head == NULL?tmp:tmp->head;   object *tmp2 = tmp->head == NULL?tmp:tmp->head;
   
Line 179
 
Line 181
      y = pet->y + freearr_y[search_arr[i]];       y = pet->y + freearr_y[search_arr[i]];
      nm = pet->map;       nm = pet->map;
      /* Only look on the space if there is something alive there. */       /* Only look on the space if there is something alive there. */
      if (get_map_flags(nm, &nm, x,y, &x, &y) & P_IS_ALIVE) {       mflags = get_map_flags(nm, &nm, x,y, &x, &y);
        if (!(mflags & P_OUT_OF_MAP) && mflags & P_IS_ALIVE) {
  for (tmp = get_map_ob(nm, x, y); tmp != NULL; tmp = tmp->above) {   for (tmp = get_map_ob(nm, x, y); tmp != NULL; tmp = tmp->above) {
      object *tmp2 = tmp->head == NULL?tmp:tmp->head;       object *tmp2 = tmp->head == NULL?tmp:tmp->head;
      if (QUERY_FLAG(tmp2,FLAG_ALIVE) && ((       if (QUERY_FLAG(tmp2,FLAG_ALIVE) && ((


Legend:
line(s) removed in v.1.39 
line(s) changed
 line(s) added in v.1.40

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