Difference for common/object.c from version 1.68 to 1.69


version 1.68 version 1.69
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_object_c =   * static char *rcsid_object_c =
  *   "$Id: object.c,v 1.68 2003/04/05 05:39:48 mwedel Exp $";   *   "$Id: object.c,v 1.69 2003/06/26 11:27:43 gros Exp $";
  */   */
   
 /*  /*
Line 495
 
Line 495
  */   */
   
 void reset_object(object *op) {  void reset_object(object *op) {
     int i;  
   
     op->name = NULL;      op->name = NULL;
     op->name_pl = NULL;      op->name_pl = NULL;
Line 505
 
Line 504
     op->msg = NULL;      op->msg = NULL;
     op->materialname = NULL;      op->materialname = NULL;
     op->lore = NULL;      op->lore = NULL;
     for(i=0;i<30;i++) {  
  op->event_hook[i] = NULL;  
  op->event_plugin[i] = NULL;  
  op->event_options[i] = NULL;  
     }  
     op->current_weapon_script = NULL;      op->current_weapon_script = NULL;
     clear_object(op);      clear_object(op);
 }  }
Line 520
 
Line 514
   
 void clear_object(object *op) {  void clear_object(object *op) {
   
       event *evt;
       event *evt2;
   
     /* the memset will clear all these values for us, but we need      /* the memset will clear all these values for us, but we need
      * to reduce the refcount on them.       * to reduce the refcount on them.
      */       */
Line 562
 
Line 559
     op->attacked_by_count= -1;      op->attacked_by_count= -1;
     if (settings.casting_time == TRUE)      if (settings.casting_time == TRUE)
  op->casting = -1;   op->casting = -1;
       /* Clean the events list */
       while (op->events != NULL)
       {
           evt2 = NULL;
           evt  = op->events;
           while (evt->next != NULL)
           {
               evt2 = evt;
               evt  = evt->next;
   
           }
   
           if (evt->hook != NULL) FREE_AND_CLEAR(evt->hook);
           if (evt->plugin != NULL) FREE_AND_CLEAR(evt->plugin);
           if (evt->options != NULL) FREE_AND_CLEAR(evt->options);
   
           FREE_AND_CLEAR(evt);
   
           if (evt2 != NULL)
               evt2->next = NULL;
           else
               op->events = NULL;
       }
   
 }  }
   
 /*  /*


Legend:
line(s) removed in v.1.68 
line(s) changed
 line(s) added in v.1.69

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