Difference for server/time.c from version 1.10 to 1.11


version 1.10 version 1.11
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_time_c =   * static char *rcsid_time_c =
  *    "$Id: time.c,v 1.10 2000/07/28 07:10:21 cvs Exp $";   *    "$Id: time.c,v 1.11 2000/10/16 19:19:31 peterm Exp $";
  */   */
   
 /*  /*
Line 155
 
Line 155
   while(op!=NULL&&op->type!=PLAYER)    while(op!=NULL&&op->type!=PLAYER)
     op=op->env;      op=op->env;
   if(op!=NULL) {    if(op!=NULL) {
     if(blocks_magic(op->map,op->x,op->y))      if(blocks_magic(op->map,op->x,op->y) && wor->stats.hp != 1)
       new_draw_info(NDI_UNIQUE, 0,op,"You feel something fizzle inside you.");        new_draw_info(NDI_UNIQUE, 0,op,"You feel something fizzle inside you.");
     else      else
       enter_exit(op,wor);        enter_exit(op,wor);
Line 669
 
Line 669
 }  }
   
 void move_teleporter(object *op) {  void move_teleporter(object *op) {
    
   if(op->above!=NULL) {    if(op->above!=NULL) {
     if(EXIT_PATH(op)) {      if(EXIT_PATH(op)) {
       if(op->above->type==PLAYER)        if(op->above->type==PLAYER)
Line 691
 
Line 692
   }    }
 }  }
   
   /*  This object will teleport someone to a different map
       and will also apply changes to the player from its inventory.
       This was invented for giving classes, but there's no reason it
       can't be generalized.
   */
   
   void move_player_changer(object *op) {
     object *player;
     object *walk;
      if(op->above!=NULL) {
       if(EXIT_PATH(op)) {
         if(op->above->type==PLAYER) {
    player=op->above;
    for(walk=op->inv;walk!=NULL;walk=walk->below)
      apply_changes_to_player(player,walk);
    link_player_skills(op->above);
    esrv_send_inventory(op->above,op->above);
    enter_exit(op->above,op);
         }
         else
           return;
       }
      }
   }
   
 /*  peterm:  firewalls generalized to be able to shoot any type  /*  peterm:  firewalls generalized to be able to shoot any type
     of spell at all.  the stats.dam field of a firewall object      of spell at all.  the stats.dam field of a firewall object
     contains it's spelltype.      The direction of the wall is stored      contains it's spelltype.      The direction of the wall is stored
Line 795
 
Line 821
    it, and insert an invisible, weightless force into him     it, and insert an invisible, weightless force into him
    with a specific code as the slaying field.     with a specific code as the slaying field.
    At that time, it writes the contents of its own message     At that time, it writes the contents of its own message
    field to the player. */     field to the player.  The marker will decrement hp to
      0 and then delete itself every time it grants a mark.
      unless hp was zero to start with, in which case it is infinite.*/
   
 void move_marker(object *op) {  void move_marker(object *op) {
   object *tmp,*tmp2;    object *tmp,*tmp2;
Line 821
 
Line 849
               
       /* if we didn't find our own MARK */        /* if we didn't find our own MARK */
       if(tmp2==NULL) {        if(tmp2==NULL) {
            
    object *force = get_archetype("force");     object *force = get_archetype("force");
    force->speed = 0;     force->speed = 0;
    if(op->stats.food) {     if(op->stats.food) {
Line 831
 
Line 860
    /* put in the lock code */     /* put in the lock code */
    force->slaying = add_string(op->slaying);     force->slaying = add_string(op->slaying);
    insert_ob_in_ob(force,tmp);      insert_ob_in_ob(force,tmp);
      if(op->msg)
        new_draw_info(NDI_UNIQUE|NDI_NAVY,0,tmp,op->msg);
      if(op->stats.hp > 0) {
        op->stats.hp--;
        if(op->stats.hp==0) {
          /* marker expires--granted mark number limit */
          remove_ob(op);
          free_object(op);
          return;
        }
      }
       }        }
   
     }      }
Line 993
 
Line 1032
   case MARKER:    case MARKER:
     move_marker(op);      move_marker(op);
     return 0;      return 0;
     case PLAYER_CHANGER:
       move_player_changer(op);
       return 0;
   }    }
   
   return 0;    return 0;


Legend:
line(s) removed in v.1.10 
line(s) changed
 line(s) added in v.1.11

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