Difference for server/time.c from version 1.4 to 1.5


version 1.4 version 1.5
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_time_c =   * static char *rcsid_time_c =
  *    "$Id: time.c,v 1.4 2000/04/17 14:18:13 jec Exp $";   *    "$Id: time.c,v 1.5 2000/05/26 09:50:49 jec Exp $";
  */   */
   
 /*  /*
Line 90
 
Line 90
     if(head!=NULL)      if(head!=NULL)
       op->head=head,prev->more=op;        op->head=head,prev->more=op;
     if (RANDOM()%10) generate_artifact(op, gen->map->difficulty);      if (RANDOM()%10) generate_artifact(op, gen->map->difficulty);
     insert_ob_in_map(op,gen->map);      insert_ob_in_map(op,gen->map,gen);
     if (QUERY_FLAG(op, FLAG_FREED)) return;      if (QUERY_FLAG(op, FLAG_FREED)) return;
     if(op->randomitems!=NULL)      if(op->randomitems!=NULL)
       create_treasure(op->randomitems,op,GT_INVENTORY,        create_treasure(op->randomitems,op,GT_INVENTORY,
Line 284
 
Line 284
       "You are crushed by the %s!",op->name);        "You are crushed by the %s!",op->name);
  } else    } else
      /* If the object is not alive, and the object either can       /* If the object is not alive, and the object either can
       * not be picked up or the object rolls, move the object        * be picked up or the object rolls, move the object
       * off the gate.        * off the gate.
       */        */
      if(!QUERY_FLAG(tmp, FLAG_ALIVE)       if(!QUERY_FLAG(tmp, FLAG_ALIVE)
Line 297
 
Line 297
      if (i!=-1) {       if (i!=-1) {
  remove_ob(tmp);   remove_ob(tmp);
  tmp->x+=freearr_x[i],tmp->y+=freearr_y[i];   tmp->x+=freearr_x[i],tmp->y+=freearr_y[i];
  insert_ob_in_map(tmp,op->map);   insert_ob_in_map(tmp,op->map,op);
      }       }
  }   }
      }       }
Line 405
 
Line 405
 {  {
   if((unsigned char)++op->stats.wc >= NUM_ANIMATIONS(op)) {    if((unsigned char)++op->stats.wc >= NUM_ANIMATIONS(op)) {
     op->stats.wc = 0;      op->stats.wc = 0;
     check_trigger(op);      check_trigger(op,NULL);
   }    } else {
   SET_ANIMATION(op, op->stats.wc);    SET_ANIMATION(op, op->stats.wc);
   update_object(op);    update_object(op);
 }  }
   }
   
 void move_hole(object *op) { /* 1 = opening, 0 = closing */  void move_hole(object *op) { /* 1 = opening, 0 = closing */
     object *next,*tmp;      object *next,*tmp;
Line 422
 
Line 423
      SET_FLAG(op, FLAG_WALK_ON);       SET_FLAG(op, FLAG_WALK_ON);
      for (tmp=op->above; tmp!=NULL; tmp=next) {       for (tmp=op->above; tmp!=NULL; tmp=next) {
  next=tmp->above;   next=tmp->above;
  apply(tmp,op,0);   move_apply(op,tmp,tmp);
      }       }
  }   }
  SET_ANIMATION(op, op->stats.wc);   SET_ANIMATION(op, op->stats.wc);
Line 502
 
Line 503
  if (tmp->type== PLAYER)   if (tmp->type== PLAYER)
      esrv_send_item (tmp, op);       esrv_send_item (tmp, op);
     } else      } else
  insert_ob_in_map(op,op->map);   insert_ob_in_map(op,op->map,op);
     op->owner=NULL; /* So that stopped arrows will be saved */      op->owner=NULL; /* So that stopped arrows will be saved */
 }  }
   
Line 589
 
Line 590
   
     /* Nothing alive?  Insert arrow and return */      /* Nothing alive?  Insert arrow and return */
     if(tmp==NULL) {      if(tmp==NULL) {
  insert_ob_in_map(op,op->map);   insert_ob_in_map(op,op->map,op);
  return;   return;
     }      }
   
Line 606
 
Line 607
  number-=8;   number-=8;
      op->face = &new_faces[number];       op->face = &new_faces[number];
  }   }
  insert_ob_in_map(op,op->map);   insert_ob_in_map(op,op->map,op);
  return;   return;
     }      }
   
Line 618
 
Line 619
  * stop the arrow.   * stop the arrow.
  */   */
  if(op->direction)   if(op->direction)
      insert_ob_in_map(op,op->map);       insert_ob_in_map(op,op->map,op);
  else    else
      stop_arrow(op,NULL);       stop_arrow(op,NULL);
     }      }
Line 656
 
Line 657
      free_object(tmp);       free_object(tmp);
  else {   else {
      tmp->x=op->x+freearr_x[j],tmp->y=op->y+freearr_y[j];       tmp->x=op->x+freearr_x[j],tmp->y=op->y+freearr_y[j];
      insert_ob_in_map(tmp,op->map);       insert_ob_in_map(tmp,op->map,op);
  }   }
     }      }
   }    }
Line 680
 
Line 681
         free_object(op);          free_object(op);
         return;          return;
       }        }
       transfer_ob(op->above,EXIT_X(op),EXIT_Y(op));        transfer_ob(op->above,EXIT_X(op),EXIT_Y(op),0,op);
     } else      } else
       teleport(op,TELEPORTER);        teleport(op,TELEPORTER,op);
   }    }
 }  }
   
Line 776
 
Line 777
  tmp->title = add_string(op->slaying);   tmp->title = add_string(op->slaying);
   }    }
   tmp->x=op->x;tmp->y=op->y;tmp->map=op->map;tmp->level=op->level;    tmp->x=op->x;tmp->y=op->y;tmp->map=op->map;tmp->level=op->level;
   insert_ob_in_map(tmp,op->map);    insert_ob_in_map(tmp,op->map,op);
 }  }
   
 /* move_marker --peterm@soda.csua.berkeley.edu  /* move_marker --peterm@soda.csua.berkeley.edu
Line 945
 
Line 946
     move_hole(op);      move_hole(op);
     return 0;      return 0;
   case DEEP_SWAMP:    case DEEP_SWAMP:
     deep_swamp(op, 0);      move_deep_swamp(op);
     return 0;      return 0;
   case CANCELLATION:    case CANCELLATION:
     move_cancellation(op);      move_cancellation(op);


Legend:
line(s) removed in v.1.4 
line(s) changed
 line(s) added in v.1.5

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