Difference for server/pets.c from version 1.6 to 1.6.2.1


version 1.6 version 1.6.2.1
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_pets_c =   * static char *rcsid_pets_c =
  *    "$Id: pets.c,v 1.6 2001/02/23 06:06:35 mwedel Exp $";   *    "$Id: pets.c,v 1.6.2.1 2001/05/25 04:08:04 mwedel Exp $";
  */   */
   
 /*  /*
Line 144
 
Line 144
   
 void pet_move(object * ob)  void pet_move(object * ob)
 {  {
   int dir;      int dir,tag;
   object *ob2, *owner;    object *ob2, *owner;
   
   /* Check to see if player pulled out */    /* Check to see if player pulled out */
   if ((owner = get_owner(ob)) == NULL) {    if ((owner = get_owner(ob)) == NULL) {
     remove_ob(ob); /* Will be freed when returning */      remove_ob(ob); /* Will be freed when returning */
    remove_friendly_object(ob);
    free_object(ob);
     LOG(llevMonster, "Pet: no owner, leaving.\n");      LOG(llevMonster, "Pet: no owner, leaving.\n");
     return;      return;
   }    }
Line 163
 
Line 165
   dir = find_dir_2(ob->x - ob->owner->x, ob->y - ob->owner->y);    dir = find_dir_2(ob->x - ob->owner->x, ob->y - ob->owner->y);
   ob->direction = dir;    ob->direction = dir;
   
       tag = ob->count;
   if (!(move_ob(ob, dir,ob))) {    if (!(move_ob(ob, dir,ob))) {
     object *part;      object *part;
   
    /* the failed move_ob above may destroy the pet, so check here */
    if (was_destroyed(ob, tag)) return;
   
     for(part = ob; part != NULL; part = part->more)      for(part = ob; part != NULL; part = part->more)
     {      {
       for (ob2 = get_map_ob(part->map, part->x + freearr_x[dir],        for (ob2 = get_map_ob(part->map, part->x + freearr_x[dir],
Line 181
 
Line 188
         if (QUERY_FLAG(new_ob,FLAG_ALIVE) && !QUERY_FLAG(ob,FLAG_UNAGGRESSIVE)          if (QUERY_FLAG(new_ob,FLAG_ALIVE) && !QUERY_FLAG(ob,FLAG_UNAGGRESSIVE)
  && !QUERY_FLAG(new_ob,FLAG_UNAGGRESSIVE) &&   && !QUERY_FLAG(new_ob,FLAG_UNAGGRESSIVE) &&
             !QUERY_FLAG(new_ob,FLAG_FRIENDLY)) {              !QUERY_FLAG(new_ob,FLAG_FRIENDLY)) {
   
           ob->enemy = new_ob;            ob->enemy = new_ob;
           if(new_ob->enemy == NULL)            if(new_ob->enemy == NULL)
             new_ob->enemy = ob;              new_ob->enemy = ob;


Legend:
line(s) removed in v.1.6 
line(s) changed
 line(s) added in v.1.6.2.1

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