Difference for common/object.c from version 1.70 to 1.71


version 1.70 version 1.71
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_object_c =   * static char *rcsid_object_c =
  *   "$Id: object.c,v 1.70 2003/07/13 07:21:11 garbled Exp $";   *   "$Id: object.c,v 1.71 2003/09/03 12:25:06 tchize Exp $";
  */   */
   
 /*  /*
Line 971
 
Line 971
  tmp=op->below;   tmp=op->below;
  remove_ob(op);   remove_ob(op);
  if(QUERY_FLAG(op,FLAG_STARTEQUIP)||QUERY_FLAG(op,FLAG_NO_DROP) ||   if(QUERY_FLAG(op,FLAG_STARTEQUIP)||QUERY_FLAG(op,FLAG_NO_DROP) ||
     op->type==RUNE)      op->type==RUNE || QUERY_FLAG(op,FLAG_IS_A_TEMPLATE))
  free_object(op);   free_object(op);
  else {   else {
      op->x=ob->x;       op->x=ob->x;
Line 1295
 
Line 1295
   return NULL;    return NULL;
 }  }
   
   /*
    * same as insert_ob_in_map except it handle separate coordinates and do a clean
    * job preparing multi-part monsters
    */
   object *insert_ob_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y){
       object* tmp;
       if (op->head)
           op=op->head;
       for (tmp=op;tmp;tmp=tmp->more){
           tmp->x=x+tmp->arch->clone.x;
           tmp->y=y+tmp->arch->clone.y;
       }
       return insert_ob_in_map (op, m, originator, flag);
   }
   
 /*  /*
  * insert_ob_in_map (op, map, originator, flag):   * insert_ob_in_map (op, map, originator, flag):
Line 1929
 
Line 1943
 }  }
   
 /*  /*
    * activate recursively a flag on an object inventory
    */
   void flag_inv(object*op, int flag){
       object *tmp;
       if(op->inv)
         for(tmp = op->inv; tmp != NULL; tmp = tmp->below){
           SET_FLAG(tmp, flag);
           flag_inv(tmp,flag);
         }
   }/*
    * desactivate recursively a flag on an object inventory
    */
   void unflag_inv(object*op, int flag){
       object *tmp;
       if(op->inv)
         for(tmp = op->inv; tmp != NULL; tmp = tmp->below){
           CLEAR_FLAG(tmp, flag);
           unflag_inv(tmp,flag);
         }
   }
   
   /*
  * set_cheat(object) sets the cheat flag (WAS_WIZ) in the object and in   * set_cheat(object) sets the cheat flag (WAS_WIZ) in the object and in
  * all it's inventory (recursively).   * all it's inventory (recursively).
  * If checksums are used, a player will get set_cheat called for   * If checksums are used, a player will get set_cheat called for
Line 1936
 
Line 1972
  */   */
   
 void set_cheat(object *op) {  void set_cheat(object *op) {
   object *tmp;  
   SET_FLAG(op, FLAG_WAS_WIZ);    SET_FLAG(op, FLAG_WAS_WIZ);
   if(op->inv)      flag_inv(op, FLAG_WAS_WIZ);
     for(tmp = op->inv; tmp != NULL; tmp = tmp->below)  
       set_cheat(tmp);  
 }  }
   
 /*  /*


Legend:
line(s) removed in v.1.70 
line(s) changed
 line(s) added in v.1.71

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