Difference for server/pets.c from version 1.2 to 1.3


version 1.2 version 1.3
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_pets_c =   * static char *rcsid_pets_c =
  *    "$Id: pets.c,v 1.2 1999/07/13 06:03:04 cvs Exp $";   *    "$Id: pets.c,v 1.3 2000/05/26 09:50:49 jec Exp $";
  */   */
   
 /*  /*
Line 60
 
Line 60
     LOG(llevDebug,"Entering pending %s in %s\n",obl->ob->name,map->path);      LOG(llevDebug,"Entering pending %s in %s\n",obl->ob->name,map->path);
     if(obl->ob->type == PLAYER) {      if(obl->ob->type == PLAYER) {
       fix_player(obl->ob);        fix_player(obl->ob);
       insert_ob_in_map(obl->ob,map);        insert_ob_in_map(obl->ob,map,NULL);
     }      }
     if (obl->ob->arch != NULL && obl->ob->type != PLAYER) {      if (obl->ob->arch != NULL && obl->ob->type != PLAYER) {
  obl->ob->speed = obl->ob->arch->clone.speed;   obl->ob->speed = obl->ob->arch->clone.speed;
Line 70
 
Line 70
       follow_owner(obl->ob,owner);        follow_owner(obl->ob,owner);
     if(QUERY_FLAG(obl->ob, FLAG_REMOVED)) {      if(QUERY_FLAG(obl->ob, FLAG_REMOVED)) {
       LOG(llevDebug,"follow_owner didn't help.\n");        LOG(llevDebug,"follow_owner didn't help.\n");
       insert_ob_in_map(obl->ob,map);        insert_ob_in_map(obl->ob,map,NULL);
     }      }
     free(obl);      free(obl);
   }    }
Line 199
 
Line 199
     tmp->x = owner->x + freearr_x[dir]+(tmp->arch==NULL?0:tmp->arch->clone.x);      tmp->x = owner->x + freearr_x[dir]+(tmp->arch==NULL?0:tmp->arch->clone.x);
     tmp->y = owner->y + freearr_y[dir]+(tmp->arch==NULL?0:tmp->arch->clone.y);      tmp->y = owner->y + freearr_y[dir]+(tmp->arch==NULL?0:tmp->arch->clone.y);
   }    }
   insert_ob_in_map(ob, owner->map);    insert_ob_in_map(ob, owner->map, NULL);
   if (owner->type == PLAYER) /* Uh, I hope this is always true... */    if (owner->type == PLAYER) /* Uh, I hope this is always true... */
     new_draw_info(NDI_UNIQUE, 0,ob->owner, "Your pet magically appears next to you");      new_draw_info(NDI_UNIQUE, 0,ob->owner, "Your pet magically appears next to you");
   return;    return;
Line 226
 
Line 226
   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;
   
   if (!(move_ob(ob, dir))) {    if (!(move_ob(ob, dir,ob))) {
     object *part;      object *part;
     for(part = ob; part != NULL; part = part->more)      for(part = ob; part != NULL; part = part->more)
     {      {
Line 255
 
Line 255
       }        }
     }      }
     dir = absdir(dir + 4 - (RANDOM() %5) - (RANDOM()%5));      dir = absdir(dir + 4 - (RANDOM() %5) - (RANDOM()%5));
     (void) move_ob(ob, dir);      (void) move_ob(ob, dir, ob);
   }    }
   return;    return;
 }  }


Legend:
line(s) removed in v.1.2 
line(s) changed
 line(s) added in v.1.3

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