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


version 1.15 version 1.16
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_pets_c =   * static char *rcsid_pets_c =
  *    "$Id: pets.c,v 1.15 2002/12/25 06:45:46 garbled Exp $";   *    "$Id: pets.c,v 1.16 2003/01/05 23:50:15 mwedel Exp $";
  */   */
   
 /*  /*
Line 40
 
Line 40
   
 object *get_pet_enemy(object * pet, rv_vector *rv){  object *get_pet_enemy(object * pet, rv_vector *rv){
     object *owner, *tmp, *attacker, *tmp3;      object *owner, *tmp, *attacker, *tmp3;
     int i,j,x,y;      int i,x,y;
     mapstruct *nm;      mapstruct *nm;
     int search_arr[SIZEOFFREE];      int search_arr[SIZEOFFREE];
   
Line 186
 
Line 186
      !QUERY_FLAG(tmp2,FLAG_FRIENDLY)       !QUERY_FLAG(tmp2,FLAG_FRIENDLY)
      && !QUERY_FLAG(tmp2,FLAG_UNAGGRESSIVE) &&       && !QUERY_FLAG(tmp2,FLAG_UNAGGRESSIVE) &&
      tmp2 != pet && tmp2 != owner && tmp2->type != PLAYER &&       tmp2 != pet && tmp2 != owner && tmp2->type != PLAYER &&
      can_detect_enemy(pet, tmp2, rv))       can_detect_enemy(pet, tmp2, rv)) {
   
  if (!can_see_enemy(pet, tmp2)) {   if (!can_see_enemy(pet, tmp2)) {
      if (tmp3 != NULL)       if (tmp3 != NULL)
  tmp3 = tmp2;   tmp3 = tmp2;
Line 196
 
Line 197
  return tmp2;   return tmp2;
      else       else
  pet->enemy = NULL;   pet->enemy = NULL;
        }
  } /* make sure we can get to the bugger */   } /* make sure we can get to the bugger */
      } /* for objects on this space */       } /* for objects on this space */
  } /* if there is something living on this space */   } /* if there is something living on this space */
Line 312
 
Line 314
  return;   return;
     }      }
     /* Calculate Direction */      /* Calculate Direction */
     if (owner->contr->petmode == pet_sad) {      if (owner->type == PLAYER && owner->contr->petmode == pet_sad) {
  /* in S&D mode, if we have no enemy, run randomly about. */   /* in S&D mode, if we have no enemy, run randomly about. */
  for (i=0; i < 15; i++) {   for (i=0; i < 15; i++) {
      dir = rndm(1, 8);       dir = rndm(1, 8);


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:39